I have a select statement and I have two dropdown lists :
$s= "SELECT area FROM $local ORDER BY area ASC";
$r = mysqli_query($con,$s);
<select name="country">
<option value="Ireland">Ireland</option>
<option value="UK">United Kingdom</option>
</select>
echo '<select name="location" id="location">';
while($row = mysqli_fetch_assoc($r)){
echo '<option value="'.$row['area'].'">'.$row['area'].'</option>';
}
echo "</select>";// Closing of list box
Now the goal is once the user selects UK or Ireland that the other drop down list will display all areas in the database that relate to the country.
Ive seen many similar problems solved by using onchange however I dont have any real experience with jQuery,Ajax or Javascript. I want the $local variable to change once the dropdown list option has been selected.