listbox problems
| From: | Sunfire | Date: | Sun, 02 Feb 2003 21:53:40 +0000 |
| Subject: | listbox problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-134048@lists.php.net to get a copy of this message | ||
i have a listbox:
<select name="users">
<?php
//connect to db and get query
mysql_connect(".....");
mysql_select_db("...");
$query=mysql_query("select username from users);
/*finish the listbox*/
while($account=mysql_fetch_array($query)){
echo "<option value=$account[username]>$account[username]<br>";
}
?>
</select>
<input type="submit" value="send">
got it to fill listbox with usernames..
now my question is how do you use the $users variable in the php script that
deals with the listbox?
iat this point all i wanted to do was print the user name that was selected
in the listbox but after i get how that works then it will load a form with
all user data in it so it can be changed..
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003