Welcome Guest, Not a member yet? Register   Sign In
show_error() to JSON
#1

Hi Guys,

Is there any way to get a JSON Version of "show_error" method?

Thanks
Reply
#2

Something like this?

PHP Code:
function show_error_json$message )
{
 
   $status = array();
 
   $status["success"] = FALSE;
 
   $status["message"] = $message;

 
   header("Content-Type: application/json");

 
   echo json_encode($status);
 
   exit;

Reply




Theme © iAndrew 2016 - Forum software by © MyBB