Ok, I have this while loop that basically grabs the data from an SQL DB and puts it into a dropdown menu, the problem is that a separate dropdown is created for each value. I need just one dropdown to display all the values.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
$conn = mysql_connect("localhost","root","")or die (mysql_error());
mysql_select_db("assignment_3", $conn);
$data = "select schoolName from schooltable";
$result = mysql_query($data, $conn) or die (mysql_error());
while ($row = mysql_fetch_assoc($result)) {
print "<select>";
print "<option value='' disabled='disabled' selected='selected'> Please Select your Undergraduate School </option>";
print "<option value='1'>".$row['schoolName']."</option>";
print "</select>";
}
?>
</body>
</html>