dimanche 28 août 2016

AjaxForm success message from Php as json

Hi am new in using ajaxform plugin and I am passing a success or error message from Php as json and I can't access the messages. Please assist me on how to do it. Here is a sample of my code.

<?Php
$results['status'] = "error";
$results['status'] = "user not added";

header('Content-type: application/json');
echo json_encode($results);
?>

Aucun commentaire:

Enregistrer un commentaire