Current File : /home/inlingua/public_html/sensoriumpsychologists.com/lib/ajaxclass2.php |
<?php
require_once '../classes/config.php';
if(isset($_POST['center_id'])){
$id=$_POST['center_id'];
$locality_sql="SELECT * FROM shristi_franchise WHERE center_id='$id' AND status!=1";
$locality_result=$conn->query($locality_sql);
if($locality_result->num_rows >0){
echo '<option value="">select franchise</option>';
while($row = $locality_result->fetch_assoc()){
echo '<option value="'.$row['franchise_id'].'">'.$row['name'].'</option>';
}}else{
echo '<option value="">Not available</option>';
}
$conn->close();
}
if(isset($_POST['franchise_id'])){
$id=$_POST['franchise_id'];
$locality_sql="SELECT * FROM shristi_franchise_detail WHERE franchise_id='$id' AND status!=1";
$locality_result=$conn->query($locality_sql);
if($locality_result->num_rows >0){
while($row = $locality_result->fetch_assoc()){
echo $row['address'];
}}else{
echo 'Not available';
}
$conn->close();
}
?>