Page 1 of 1

dropdown menu coding

Posted: Tue Feb 03, 2004 11:56 am
by grudz
Hi,

I have and if statement in my </head>

Code: Select all

if ($_GET['type'] == "resto")
{
	$list1 = $row_List['food'];
}
this is not final, im just testing it.....

anyway....

then i have a dropdown menu with this code

Code: Select all

<form name="" method="post" action=""></p>
<select name="list1" class="textfield">
<?php
do {  
?>
<option value="<?php echo $list1?>"><?php echo $list1?></option>
<?php
} while ($row_List = mysql_fetch_assoc($List));
  $rows = mysql_num_rows($List);
  if($rows > 0) {
      mysql_data_seek($List, 0);
	  $row_List = mysql_fetch_assoc($List);
  }
?>
                              </select>
                            </form>
the problem i have is that the choice that the dropdown menu gives me is the same.....i have the right amount, but a repeated one.....like if the output should be "choice 1" and "choice 2", it gives "choice 1" and "choice 1"

any ideas wheres the problem with my code?

thank you in advance