Log in

View Full Version : How to create a link based on user input



dowens
08-20-2007, 05:34 PM
I have a form that prompts user for a client code (i.e. 0001).
When the code (0001) is entered and the submit button clicked I need to
build a link based on client code and link the user
to https://ipaddress/ABC/0001.


The variable is the client code

How do I construct the link then execute it?

:confused:

djr33
08-21-2007, 12:09 AM
Assuming you can use PHP, this will work:

<?php echo 'http://..../.../file.ext?code='.$_GET['code']; ?>

That will work if the link to the page is ?code=0001, which would be the case with method="get" on the form. If you chose to use method="post", just use $_POST[... instead.