I want to fill a select box with results from db eg:
Code for select box:
<form id="form1" name="form1" method="post" action="">
<label>
<select name="select">
<option value="userid">User Name</option>
</select>
</label>
</form>
Code to get userid from db:
while($row = mysql_fetch_array($result))
{
echo $row['id'] . " " . $row['name'];
echo "<br />";
}
I need to join them together
The only problem is i cant find any tutorials on the web and it's beyond my current ability so i cant work it out? Dose any one have a code example i could look at please!
Thank You
Code for select box:
<form id="form1" name="form1" method="post" action="">
<label>
<select name="select">
<option value="userid">User Name</option>
</select>
</label>
</form>
Code to get userid from db:
while($row = mysql_fetch_array($result))
{
echo $row['id'] . " " . $row['name'];
echo "<br />";
}
I need to join them together
The only problem is i cant find any tutorials on the web and it's beyond my current ability so i cant work it out? Dose any one have a code example i could look at please!
Thank You