ok
Direktori : /proc/self/root/home2/selectio/www/thedentalpark.com/admin/ui-pages/ |
Current File : //proc/self/root/home2/selectio/www/thedentalpark.com/admin/ui-pages/time_slot.php |
<?php require_once '../config/config.php'; $date=$_GET['date'] ?? 0; $statement = $pdo->prepare("SELECT time FROM `tbl_appointment_booking` WHERE 1=1 and date='$date'"); $statement->execute(); $customers = $statement->fetch(PDO::FETCH_ASSOC); $array1=array(); $array2=array('09:30 AM','10:30 AM','11:30 AM','12:30 PM','01:30 PM','05:30 PM','06:30 PM','07:30 PM','08:30 PM'); $results=array_diff($array2,$array1); if($customers){ foreach($customers as $cus){ $array1[]=$cus['time']; } $response['error']=false; $response['message']="details fetched successfully"; $response['data']=$results; } else{ $response['error']=true; $response['message']="no data found"; } echo json_encode($response); ?>