Jump to content

<form> Navigation. Depending On Contents Of Input Box


dzhax
 Share

Recommended Posts

I am working on a highscore page and i need to have a search function that allows for users to search for a player.

<form action="index.php" method="post" class="no_margin">	 <input id="search_name" class="textinput text" maxlength="12" type="text" name="user1" value="">	 <input type="submit" name="submit" class="buttonmedium" value="Search"></form>

That is the form. But i need it to redirect to index.php?username= WHAT EVER TYPED IN search_name input box.is this possible?

Link to comment
Share on other sites

you can use $_REQUEST['user1'] instead of $_GET['user1'] and it will work both through the URL and post method (on the index page)

Edited by smerny
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...