AileenaKristan
New Member
I tried to get json data from server.I tested php file and it works fine. (I can see json type's data with chrome)here is my codeThanks in advance,\[code\] //php $result = mysql_query($sql, $connect); if($result){$rows = array();while($r = mysql_fetch_assoc($result)) { $rows[] = $r;}echo json_encode($rows); } else{echo false; } mysql_close($connect);\[/code\]and here is java\[code\] public static JSONArray post(String url, RequestParams params) { client.post(getAbsoluteUrl(url), params, new JsonHttpResponseHandler(){ @Override public void onSuccess(JSONArray data) { // TODO Auto-generated method stub HTTPRESPONSE = data; Log.v("OWL", "GOT JSON FROM php"); } }); //Log.v("OWL", "Class HTTP: " + HTTPRESPONSE); return HTTPRESPONSE; }\[/code\]