Hi All I'm calling one php script from my Android code to insert record into the database. On successful insert I'm getting one string in following format-
{"success":1,"message":"Member registered successfully."}
And in case of error I'm getting the following string-
{"success":0,"message":"Oops! An error occurred."}
Now I wants to parse that string to check whether record is inserted successfully or not for that I have tried following code
JSONArray jsonarray = new JSONArray(response);
JSONObject jsonobj = jsonarray.getJSONObject(0);
String strResp=jsonobj.getString("success");
but strResp is getting null..! Please help. Thank you..!