The code is working on a local server but when it was hosted in cpanel it return an empty response. . Is this because of the code? or a rule or is it because of cpanel
$data=array();
$q=mysqli_query($con,"SELECT a.*,a.date_added AS date_added2,a.status AS entry_status,a.added_by AS entry_provider FROM entries a WHERE a.status = 'Approved' ORDER BY a.id DESC")
or die(mysql_error());
while ($row=mysqli_fetch_object($q)){
$data[]=$row;
}
echo json_encode($data);
?>