API Tutorial... Decoding JSON
Posted: Thu Aug 18, 2011 12:09 am
hey guys...
i have a question... you know the errors parameters in the JSON well its encoded in another array...
i was wondering how you decode that array aswell... to show the independant error messages as im kinda stuck...
init.inc.php:
i have a question... you know the errors parameters in the JSON well its encoded in another array...
i was wondering how you decode that array aswell... to show the independant error messages as im kinda stuck...
init.inc.php:
session_start(); $login = surfcms::validate_credentials($_POST['username'], $_POST['password'], $_POST['key']); $session = $login['session']; $username = $login['username']; $errors = $login['errors']; if($session==1){ $_SESSION['site'] = "scms_" . $username; }else{ echo $errors; }Cheers