I have 2 dropdowns on my HTML page : The first drop down contains the database column names based on which the the second dropdown would be populated i.e.>
Divyesh here, your answer is
==============================
edit.php
==============================
================
ajaxData.php
================
0)
{
echo '';
while($row = mysqli_fetch_array($query))
{
echo '';
}
}
else
{
echo '';
}
}
if(isset($_POST["sid"]) && !empty($_POST["sid"]))
{
//Get all city data
$query = mysqli_query($con,"SELECT * FROM city WHERE sid =".$_POST['sid']."");
//Count total number of rows
$rowCount = mysqli_num_rows($query);
//Display cities list
if($rowCount > 0)
{
echo '';
while($row = mysqli_fetch_array($query))
{
echo '';
}
}
else
{
echo '';
}
}
?>