Trying to place a drop down box in a table
Posted: Mon Apr 16, 2007 11:43 am
this code (used outside a table) works fine
this code
Returns only the "}" that is on the line after the animalid and none of the animals.
Thank you
Code: Select all
echo "<form action='bulls.php' method=post>";
echo "<select name='bulllist' size='10'>";
while ($row = mysql_fetch_array($result1)) {
extract($row);
echo "<option value=\"".htmlspecialchars($animalid)."\">$animalid";
}
echo "</select>";
echo "<input type=submit value=submit>";
echo "</form>";Code: Select all
echo "<table align='center' border='2' width='400' bgcolor='#800000' bordercolor='#000000'>";
echo "<tr>\n
<td>
<form action='bulls.php' method=post>
<select name='bulllist' size='10'>
while ($row = mysql_fetch_array($result1)) {
extract($row);
<option value=\"".htmlspecialchars($animalid)."\">$animalid
}
</select>
<input type=submit value=submit>
</form>
</td>
</tr>";
echo "</table>\n";Thank you