D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
designpitara.com
/
admin
/
services
/
Filename :
getLastsubServcies.php
back
Copy
<?php include("../include/config.php"); $main_service_id = $_POST['main_service_id']; if (!empty($main_service_id)) { $query = "SELECT * FROM `services_category` where `services_category`.`service_id`='$main_service_id'"; $result = $conn->query($query); if ($result->num_rows > 0) { echo "<option value=''>Select Category</option>"; while ($row = $result->fetch_assoc()) { echo '<option value="'.$row['id'].'">'.$row['name'].'</option>'; } }else{ echo '<option value="">Service Category not available</option>'; } }elseif (!empty($_POST['sub_service_id'])) { $sub_service_id = $_POST['sub_service_id']; $query = "SELECT * FROM `services_last_level` WHERE `services_last_level`.`service_cat_id` = '$sub_service_id'"; $result = $conn->query($query); if ($result->num_rows > 0) { echo "<option value=''>Select Last Level Service</option>"; while ($row = $result->fetch_assoc()) { echo '<option value="'.$row['id'].'">'.$row['name'].'</option>'; } }else{ echo '<option value=""> Service Not available </option>'; } } ?>