ok
Direktori : /proc/self/root/home2/selectio/www/tnpsctestbatch.com/admin/old/api/backups/ |
Current File : //proc/self/root/home2/selectio/www/tnpsctestbatch.com/admin/old/api/backups/get-user-role.php |
<?php include"../config/config.php"; if($_POST['type']=="get_role"){ $usertype_id = $_POST['usertype_id']; $where=""; if($usertype_id!='all' && $usertype_id!=''){ $where="WHERE usertype_id=$usertype_id"; } $statement = $pdo->prepare("SELECT * FROM `tbl_role` $where"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); $totalrow = $statement->rowCount(); if($result){ $response['data']=$result; $response['error']=false; $response['message']="Role details fetched Successfuly"; }else{ $response['error']=true; $response['message']='failed'; } echo json_encode($response); } ?>