Essentially:
PHP Code:
$result = mysql_query("SELECT * FROM members");
echo '<select>'; // start your select box before you loop kicks off
while($row = mysql_fetch_array($result)){
// now we are inside the loop so do stuff
// repeatedly until the array ends
$b=$row["login"];
echo '<option>';
echo $b++; // what for?
echo '</option>';
}
echo '</select>'; //end your select box now the loop has finished
Not sure if this is your case exactly, but often when outputting PHP as HTML elements and this do not seem as they should, go and look at the HTML Source code of the page --- this will often turn up basic errors, failing to close tags etc.
Bookmarks