Form form submission data, there is another different form can be Ajax to submit multiple pictures, how they are associated with the same piece of data

Source: Internet
Author: User
The same page, there are 2 of forms,
Form 1 Submit text message,
Form 2 Submit a picture through Ajax, you can submit a large number of images,

Now assume that the data table structure for form 1 is
ID---Data
1---AAA
2---BBB

The data table structure of form 2 is
ID---Img_url
1---xxx1
2---xxx2

Now the page introduces a random ID that ties the two together
The data table structure of form 1 is
ID---data---random ID
1---AAA---ABC1
2---BBB---dea2

The data table structure of form 2 is
Id--img_url---random ID
1---xxx1---ABC1
2---xxx2---ABC1

That is, the first piece of data, which is bound to two images.

How about using the random ID to relate the two methods to the same data, please? What else is the other way?

Reply content:

The same page, there are 2 of forms,
Form 1 Submit text message,
Form 2 Submit a picture through Ajax, you can submit a large number of images,

Now assume that the data table structure for form 1 is
ID---Data
1---AAA
2---BBB

The data table structure of form 2 is
ID---Img_url
1---xxx1
2---xxx2

Now the page introduces a random ID that ties the two together
The data table structure of form 1 is
ID---data---random ID
1---AAA---ABC1
2---BBB---dea2

The data table structure of form 2 is
Id--img_url---random ID
1---xxx1---ABC1
2---xxx2---ABC1

That is, the first piece of data, which is bound to two images.

How about using the random ID to relate the two methods to the same data, please? What else is the other way?

Do you want to upload an image asynchronously?
Can be through JS, click on a button, upload images asynchronously, upload the image of the address into a form of hidden input,
Then click Submit form, the image address to submit.

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