I would like to ask how the attachment database stores the relevant article ID. In general, the cms system or the mall system has an independent data table for their attachments. in my personal understanding, what about the past, put the image (attachment) in POST and upload it normally. First, write an SQL statement for the newly added & nbsp; article, and then obtain the mysql_insert_id () generated in this article, and then write it again & nbsp; add an attachment SQL. in the link article id, enter mysql_insert _. For more information, see the principle of saving the attachment database article ID.
General cms system or mall system
Their attachments all have an independent data table.
My personal understanding:
In the past, I put the image (attachment) in POST and used it for normal uploads,
First, write an SQL statement for the new article, and then obtain the mysql_insert_id () generated for this article ()
Then write the SQL statement for adding an attachment, and fill in mysql_insert_id () in the link article id to link the attachment with the article.
I used to do the same before.
But recently I think about it...
Now there are some uploadify, SWFUpload, and so on, and even some cropped imgAreaSelect, crop, etc.
They all Upload without post, and even I haven't processed the POST content to write SQL. these kits have helped me Upload things,
So I uploaded the file first. how can I know the attachment table of the relevant article?
Could you advise me?
------ Solution --------------------
After the plug-in is uploaded, the value is stored in a hidden field and submitted together during post.
------ Solution --------------------
Those are uploaded asynchronously... after you click start upload, a hidden form puts all the image paths you selected into the input node and submits them to the backend php. after processing, a hidden iframe is used to receive src, it is displayed to you and hidden input is generated to submit and bind these images together with the article src.
It's actually ajax.