wood burning stoves 2.0*
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
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: 55
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: 41601
    
  55
Post the JSON data that is being returned. Does it have data for "user"?


Ping & DNS - my free Android networking tools app
Gil Carvalho
Ranch Hand

Joined: Dec 10, 2013
Posts: 55
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: 41601
    
  55
So the problem is in the PHP code somewhere...?
Gil Carvalho
Ranch Hand

Joined: Dec 10, 2013
Posts: 55
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: 41601
    
  55
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