how do I pass a username form variable from a drop down list/menu to another page?
Hi,
I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
How do I pass the username info from the drop down list/menu to the username.php page?
The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
<form id="form1" name="form1 method="post" action="username.php">
<label for="username_id">choose username:</label>
<select name="username_id" id-"username_id">
<option value="1">username1</option>
<option value="2">username2</option>
<option value="3">username3</option>
<option value="4">username4</option>
</select>
<input type="submit" name="send" id="send" value="Submit" />
<input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
</form>
Could somebody help me please?
Thanks.
