Does php receive json data sent by android? Solution

Source: Internet
Author: User
Does php receive json data sent by android? & Lt ;? Php $ response & nbsp; = & nbsp; array (); include ("conn. php "); $ conn = mysql_open (); $ SQL & nbsp; = mysql_query ('set & nbsp; names & nbsp; utf php receives json data sent by android?
$ Response = array ();
Include ("conn. php ");
$ Conn = mysql_open ();
$ SQL = mysql_query ('set names utf8 ');
Mysql_query ($ SQL );
If (isset ($ _ POST ['name']) {...... Why does the system prompt an undefined name? Name is the android json php sent by android.
------ Solution --------------------
Reference:
Reference: Aren't you using json? What is the content you sent? How do you know this? what is the error message? This is a prompt. thank you for your prompt. Android end
Params. add (new BasicNameValuePair ("name", name ));
JSONObject json = jsonParser. makeHttpRequest (url_u ......


Check whether the name is obtained. you can save the value to the file. Because the Android program calls your php file as soon as it is opened, and you open the file again, it must have been copied.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.