This can be useful sometimes if you need to put data base from mysql database, then put value to your combo box.
code to paste:
note: Start php code. see ex. <?php and end with?>
//*put code connecting to the database*//
echo "<tr>";
echo "<td align='right'><font face='verdana' size='2'>Location:</font></td>";
echo "<td>";
$result = mysql_query("SELECT * FROM location order by location");
echo "<select name='location'>";
echo "<option>----Select Location----</option>";
while($row = mysql_fetch_array($result))
{
echo $location = $row['location'];
echo "<option value='$location'>$location</option>";
}
echo "</select>";
echo "</tr>";
//*close database*//
No comments:
Post a Comment