im having a problem with drop down boxes
Code: Select all
<?php
include 'connect.php';
$iterationno = 1;
while($iterationno <
{
$getalldishes = @mysql_query("SELECT name FROM dishes");
if(!$getalldishes)
{
echo "fail";
}
echo "<p><select name = \"newdish\" size = 1>";
while ($row = mysql_fetch_array($getalldishes))
{
$name = $row['name'];
echo"<option value =\"{$row['name']}\">{$row['name']}</option>";
}
echo"</select></p>";
$iterationno++;
}
?>this php script is in a file called "editplanframe.php" which is opened through a link in a file called autoplan.php. autoplan.php also passes 7 parameters which are strings. what i want to know is how can i make the first box display the value of the first string passed as the default?
hope this makes sense. thanks