Firefox vs. IE
Posted: Thu Mar 31, 2005 2:25 pm
I have a question with some data not being shown correctly in IE. I take some usernames out from a db and then throw them into a selection box. In IE it dosen't show the first name, that should appear in the selection box.
Now the funny thing is that, if I use a do-while loop on showing the results it works in both browsers. Well here is my code
does anybody know why it's behaving like this?
thallish
Now the funny thing is that, if I use a do-while loop on showing the results it works in both browsers. Well here is my code
Code: Select all
// following code creates HTML selection box and fills it with the usernames from the database
// that is active
echo "<p>Vælg brugernavn: <br />";
echo "<select size=\"1\" name=\"userId\" \">";
// connecting to database
$connection = connection();
$query = "SELECT * FROM user WHERE isActivated='yes' ";
$result = mysql_query($query) or die("<p> Der opstod en fejl ved indhentning af data" . mysql_error() . "</p>");
while ($row = mysql_fetch_array($result)) {
echo "<option value=\"{$row['userId']}\">{$row['username']}</option>";
}
// closing database connection
DBClose();
echo "</select>";
echo "<input type=\"submit\" value=\"Vælg\" />";
echo "</p>";thallish