<html>
<head>
<title>The Reservation</title><link rel='stylesheet' href='designstudent.css'>
</head>
<body>
<?php
mysql_connect('localhost', 'root', '')
or die(mysql_error());
mysql_select_db('shuttle_service_system')
or die(mysql_error());
$info =mysql_query("
SELECT DISTINC Location_From AS 'LocationFrom'
FROM trip
");
echo "<select class = 'LocationFrom' select size='1'>";
while($check = mysql_fetch_array($info))
{
echo "<option>" . $check['trip.Location_From'] . "</option>";
}
echo"</select>";
?>
</body>
</html>
大家好,我正在制作一个带有来自 MySQL 的下拉菜单的班车预订系统,我无法让 MySQL 上的数据出现在下拉菜单中。