<?php
include('../include/connection.php');

echo '<option value="">Senatorial District</option>';
$query = "select id,name from districts where state_id=:state order by name";
                                    $sq = $con->select_query($query, array(':state'=>$_GET['state']));
                                    foreach($sq as $a)
                                    {
                                        echo '<option value="'.$a['id'].'">'.$a['name'].'</option>';
                                    }
?>