Re: listbox problems

From: Date: Sun, 02 Feb 2003 21:56:59 +0000
Subject: Re: listbox problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134050@lists.php.net to get a copy of this message
On Sun, 2 Feb 2003, Sunfire wrote: > 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.. Read this: http://www.php.net/variables.external Regards, Philip

« previous php.general (#134050) next »