<tr>
<td><label class="label label-success">Building Name: </label></td>
<td>
<select class="form-control" name="building_name" required>
<option value="">Select Building</option>
<?php
include '../Database/db.php';
$res=mysql_query("SELECT * FROM building");
while($row = mysql_fetch_array($res)){
?>
<option value="<?php echo $row['building_name']; ?>"><?php echo $row['building_name']; ?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td><label class="label label-success">Floor: </label></td>
<td>
<select class="form-control" name="floor" required>
<option value="">Select Floor</option>
<option>></option>
</select>
</td>
</tr>
can anyone help me i want to display the floor of the selected building from the database. if i choose the building the floor will be display on select option floor.