Select box

From: Date: Tue, 18 May 2004 08:06:12 +0000
Subject: Select box
Groups: php.general 
Request: Send a blank email to php-general+get-186453@lists.php.net to get a copy of this message
Hi all For the likes of me I cant seem to figure out how to have a select drop down box , and have it so, that when I click the submit button, the page displays the correct content (which is what it does) but at the same time I need the select box to be at the option of the query. Below is part of my code. If someone could help, it would be most appreciated. <select name="uname"> <?php $sqlu="SELECT id,user,name FROM users ORDER BY user ASC"; $name_result = mysql_query($sqlu); while($rowu=mysql_fetch_array($name_result)){ echo"<option value=\"$rowu[user]\">$rowu[user]</option>\n"; } ?> </select>

« previous php.general (#186453) next »