I am building an html form that will need to dynamically fill in the first input field with the "facility" column values in my "doctors" table. The facility column contains the names of our 7 offices. However, when I run the code below, my input field is blank and I have verified there is data in my "doctors" table. After this is working, I need to be able to dynamically fill in the second input field (which I haven't coded for in the code below because I'm stuck with the issue of first input) with the "provider" column values, also from my "doctors" table. The "provider" column contains all the provider names in our practice. However, the providers should be filtered, so that only the providers at the facility from the first input field is showing.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<?php
$link = mysqli_connect("localhost","USERNAME","PASSWORD");
mysqli_select_db($link,"DB");
?>
<head>
<title> Untitled Doc</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name "form1" action="" method="post">
<select>
<?php
$res=mysqli_query($link,"select facility from doctors");
while($row=mysqli_fetch_array($res)){?>
<option> <?php echo $row ["facility"]; ?></option>
<?php }?>
</select>
</form>
</body>
</html>