1
2
3
4
5
6
7
8
9
<?php
require 'db.php';
if(isSet($_POST['region_code'])) {
$res=$db->query("SELECT * FROM schools  WHERE id='".$_POST['region_code']."'");
while ($row = $res->fetch_array(MYSQLI_BOTH)) {
echo '<option value="'.$row[0].'">'.$row[1].'</option>';
}
}
?>