Please tell me about the attachment database how to save the relevant article ID principle

Source: Internet
Author: User
Ask about the attachment database to save the relevant article ID principle
General CMS system or mall system
There's a separate data sheet for all their attachments.

A personal understanding:
Previous words, put the picture (attachment) in the post, with the general upload,

Write a new SQL for the article, and then get the mysql_insert_id () that generated this post

Then write the new add-on SQL, fill in the relationship Article ID mysql_insert_id (), the attachment and the article to connect

I usually do the same thing before.

But I've been thinking about it lately ...
Now there are some uploadify, swfupload and the like, even the cut imgareaselect, crop and the like.

They all upload without post, and even I haven't processed the post content to SQL, these kits have helped me to upload things,

That has been uploaded first, how do I add the attachment table to know what is the attachment of the relevant article?

Please enlighten your predecessors.
------Solution--------------------
After uploading the plugin, the value exists in the hidden field, which is submitted together with your post.
------Solution--------------------
Those are asynchronous uploads ... You point to start uploading, there is a hidden form to put your selected picture path into the input node submitted to the background PHP, processing finished with a hidden iframe to receive SRC, show you, while generating hidden input to the image Src and the article submitted together, bound together
It's Ajax, actually.
  • 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.