Forum Moderators: coopster
Any idea's of where I'm going wrong?
<html>
<head>
<title>test</test>
</head>
<?
$database ="books";
mysql_connect("localhost","demo","")
or die("Unable to connect to server");
mysql_select_db($database) or die ("Unable to connect to database");
$query = "SELECT DISTINCT ffrom FROM type order by type";
$result = mysql_query($query)
or die ("couldnt execute query.");
echo "<form action='view_specific.php' method = 'post'>
<select name='departure'>\n";
while ($row = mysql_fetch_array($result))
{
extract($row);
echo "<option value='$departure'>\n";
}
echo "</select>\n";
echo "<input type ='submit' value='search'>
</form>\n";
?>
</body>
</html>