Get form submitted data to array to background

Source: Internet
Author: User
How do I get the value from the form into a string and give it back to the background?

Reply content:

How do I get the value from the form into a string and give it back to the background?

First, the GET request cannot be passed directly to the JSON, if it is POST , and PUT so on request body request, need to Content-Type set to appliaction/json , then body can plug array/object.

The name of the form is set to a uniform name, such as name[], so that the $_post[name received in the background of PHP] is an array

Cannot be uploaded into the background after stitching into a string?



Form label is method= "POST"
$_post[' P_name ' is an array

Format of the general storage database:
1. JSON
2. The array is converted or spelled into a string.
3, the string format of the direct storage array. (Phpcms do so)

Need to know how the specific business will be stored

  • 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.