Log in

View Full Version : Resolved dropdown menu populated by mysql



liamallan
03-19-2010, 10:01 AM
hi, i am currently working on a private messaging system for my site. right now i have text input for the 'reciever' field:

<tr>
<td width="150px" align="left" valign="top"><p>Username</p></td>
<td width="" align="left" valign="top"><input name="username" type="text" id="username" value="<?php echo "$reciever"; ?>"></td>
</tr>
i am trying to change this to a dropdown menu which will allow the user to select 'reciever' from a list in the dropdown, but im having trouble populating it.
this is how it looks just now:

<SELECT NAME="username" value="<?php echo "$reciever"; ?>">
<OPTION VALUE=0>Choose
<? echo $rows['username']?>
</SELECT>
any ideas? all help appreciated!

liamallan
03-19-2010, 08:25 PM
never mind, figured it out.