ok

Mini Shell

Direktori : /home2/selectio/public_html/tnpsctestbatch.com/admin/api/
Upload File :
Current File : /home2/selectio/public_html/tnpsctestbatch.com/admin/api/get-tab-headings.php

<?php include"../config/config.php";

if($_POST['type']=="get_headings"){
    
    
   $category = $_POST['category'];
   
   $where="";
   
if($category!='all' && $category!=''){
    $where="WHERE category=$category";
}
    
        $statement = $pdo->prepare("SELECT * FROM `tbl_tab_headings` $where");
		$statement->execute();
		$result = $statement->fetchAll(PDO::FETCH_ASSOC);
		$totalrow = $statement->rowCount();
		
		if($result){
		    $response['data']=$result;
		    $response['error']=false;
		    $response['message']="Headings Details Fetched Successfully";
		}else{
		    $response['error']=true;
		    $response['message']='failed';
		}
		
		echo json_encode($response);
 
}
?>

Zerion Mini Shell 1.0