Stuck and need help. JSON parser cannot convert data so I can use the username and password to login.
jsonParser = new JSONParser();
public JSONObject loginUser(String username, String password) {
// Building Parameters
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("tag", login_tag));
params.add(new BasicNameValuePair("username", username));
params.add(new BasicNameValuePair("password", password));
JSONObject json = jsonParser.getJSONFromUrl(loginURL, params);
return json;
}
PHP part of the code:
while($r = mysql_fetch_assoc($result)) {
$json[] = $r;
}
print json_encode($json);