edwin.deloso
28 Dec 2010, 7:40 PM
Hi guys,
I need your little help in my little understanding of json object.
Here is the result output from my login page.
My aim is to get the user Id return from json object but when i echo
echo json_encode($result);- > this is the return values... it goes to failure function in ext js UI
Access Denied : [{"userId":"15","0":"15","username":"eadeloso","1":"eadeloso","password":"12345","2":"12345"}]
if I put this two:
echo '{"success":"true"}' ;
echo json_encode($result);
an error will occurs.
My question are:
1. How can return the json result with success = true so that it will be catch in success funtion of my UI.
2. How can get the json object or data for the userId only.
I just need to get the userId here like for the example data userid is 15.
thanks for any help.
I need your little help in my little understanding of json object.
Here is the result output from my login page.
My aim is to get the user Id return from json object but when i echo
echo json_encode($result);- > this is the return values... it goes to failure function in ext js UI
Access Denied : [{"userId":"15","0":"15","username":"eadeloso","1":"eadeloso","password":"12345","2":"12345"}]
if I put this two:
echo '{"success":"true"}' ;
echo json_encode($result);
an error will occurs.
My question are:
1. How can return the json result with success = true so that it will be catch in success funtion of my UI.
2. How can get the json object or data for the userId only.
I just need to get the userId here like for the example data userid is 15.
thanks for any help.