sctwest
03-22-2004, 03:31 PM
My data entry form stores data in the (dataentry_tbl) and the select box would grab data from a table (assign_tbl). I have the data entry form done and it works but I am confused on how to make another connection for the select box.
Can someone give me an example of how I can do this?
sidney
03-22-2004, 05:10 PM
not sure what your asking post some code
what fields are in your table etc
do you just want to grab data from mysql table assign_tbl
and put it in a select box on form page
the more info you can supply the more we can help
sctwest
03-22-2004, 05:49 PM
just grab data from mysql table assign_tbl
and put it in a select box on form page.
sidney
03-22-2004, 05:57 PM
somthing like this
<select name="To" size="5">
<?php
$c=mysql_query("SELECT * FROM assign_tbl ORDER BY id");
while($t=mysql_fetch_array($c))
{
echo "<option value=\"$t['fieldname']\">$t['fieldname']</option>\n";?>
}
?>
</select>
sctwest
03-22-2004, 06:06 PM
Thats what I needed, now I can play around with this to make it work for me.