1

Hello all I am creating an android application and using HttpURLConnection Class. Here urlConn is object of HttpURLConnection class. JSONObject jo = new JSONObject(); jo.put("name","xyz"); jo.put("email","xyz@abc.com")

I am sending this using..

OutputStreamWriter out = new OutputStreamWriter(urlConn.getOutputStream());
out.write(jo.toString());
out.close();

Now i want to fetch this data into php page that i have hosted online. So please tell me how to fetch JSONObject data in to php page.

Mayank Acharya
  • 81
  • 3
  • 11

1 Answers1

0

Read about json decode :

http://php.net/manual/en/function.json-decode.php

SO dicsussion :

Parsing JSON object in PHP using json_decode

Community
  • 1
  • 1
Rohit Gulati
  • 542
  • 3
  • 15
  • I have tried but didn't able to get. I want to fetch this variables and store in to separate variable in to php script then want to store into Database. I want output like this $name = xyz $email = xyz@abc.com in php. – Mayank Acharya Feb 21 '16 at 17:06