File "get_single.php"

Full Path: /home/analogde/www/Massage_v3_debug/datatable/03/get_single.php
File size: 373 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
require_once('connect.php');
extract($_POST);
$query = $conn->query("SELECT * FROM `authors` where id = '{$id}'");
if($query){
    $resp['status'] = 'success';
    $resp['data'] = $query->fetch_array();
}else{
    $resp['status'] = 'success';
    $resp['error'] = 'An error occured while fetching the data. Error: '.$conn->error;
}
echo json_encode($resp);