aspose file tools*
The moose likes PHP and the fly likes org.json.JSONException: No value for user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Languages » PHP
Bookmark "org.json.JSONException: No value for user" Watch "org.json.JSONException: No value for user" New topic
Author

org.json.JSONException: No value for user

Gil Carvalho
Ranch Hand

Joined: Dec 10, 2013
Posts: 57
Hi

I'm getting this error in my login and i don't know why

My php



My login.java



My JsonParser



and my Userfunctions



The errors i get



Any help please??
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42908
    
  69
Post the JSON data that is being returned. Does it have data for "user"?
Gil Carvalho
Ranch Hand

Joined: Dec 10, 2013
Posts: 57
I don't know

When i put this in my php




The logCat gives me this



The problem is it seems that the response variable in php don't fill the JSonObject "user"
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42908
    
  69
So the problem is in the PHP code somewhere...?
Gil Carvalho
Ranch Hand

Joined: Dec 10, 2013
Posts: 57
Hi

Maybe, but i don't know where.
The query works since the first if after the query works, i put a acho there.
The problem is the §response variable seems to don't get the variables, why?

Regards
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42908
    
  69
I'll move the question over to the PHP forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.json.JSONException: No value for user