I have this code where a user selects the particular category of doctor and then the District in which he wants to look it. After state he needs to click the station(in the selected district) Doctor >> District >> Station
Here is the code
Process.php
$mySqlStm ="SELECT Name FROM doctors WHERE Category='$myValue' and Station='$myStation'";
$result2 = mysql_query($mySqlStm) or die("Error:mysql_error()");
if(mysql_num_rows($result2) == 0){
echo("
no records found");
}
ELSE
{
echo "";
//ECHO THE RECORDS FETCHED
while($row = mysql_fetch_array($result2))
{
echo "";
//echo "" . $row['Station'] . " ";
echo "" . $row['Name'] . " " ;
//echo "" . $row['Phone 1'] . " ";
//echo "" . $row['Mobile'] . " ";
}
I want the station category to be auto filled when district is selected and When a category of doctor is selected, the district has to be auto filled.
How can I do it? I would prefer Javascript because I know a little bit about it.
Also, i have all the data in one database it looks like this
Category | Station | District | Name | Qualification and so on
Privacy & Cookie Consent
We use cookies to ensure the best experience on our website. This includes analytics, personalization, and marketing purposes. Some cookies are essential for the website to function properly.
By clicking "Accept", you consent to our use of cookies. You can read more about how we use cookies and how you can change your preferences in our Privacy Policy.