Hello everydoby. I have just started programming with php. I have a question, why this code is not working. I have checked and checked and cheched but I can not find the error. Could anybody help me. I am just trying to fill a drop menu with a table in a Dababase called at705.
<html>
<body>
<?php
$db = mysql_connect("localhost", "at705", "m0d13");
if ($db)
{
$sql = "select state_id from states";
$result = mysql_query($sql, $db);
if ($result <> "false"){
echo "<select name= state_id size = 1>";
while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
$state_id = $row["state_id"];
Cheers,
Crisat705
echo "<option value=\"$state_id\">;
$state_id</option>";
}
}
}
echo "</select>";
?>
</body>
<html>