Welcome Guest, Not a member yet? Register   Sign In
show_error() to JSON
#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


Messages In This Thread
show_error() to JSON - by undefined - 07-11-2017, 04:26 PM
RE: show_error() to JSON - by Martin7483 - 07-12-2017, 01:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB