After the image is uploaded in batches, how can I insert the path with other fields into the database?

Source: Internet
Author: User
After images are uploaded in batches, how do I insert paths to the database together with other fields? & Lt; html & gt; & lt; head & gt; & lt; meta & nbsp; http-equiv = "Content-Type" & nbsp; content = "text/html; & nbsp; c How do I insert a path to the database together with other fields after the image is uploaded in batches successfully?



Batch upload of images





Select the file to Upload


$ Destination_folder = "picture /";

If (! File_exists ($ destination_folder ))
{
Mkdir ($ destination_folder );
}

Foreach ($ _ FILES ["u_file"] ["error"] as $ key => $ error ){
If ($ error = UPLOAD_ERR_ OK ){
$ Tmp_name = $ _ FILES ["u_file"] ["tmp_name"] [$ key];
$ Name = $ _ FILES ["u_file"] ["name"] [$ key];
$ Uploadfile = $ destination_folder.time (). $ name;
Move_uploaded_file ($ tmp_name, $ uploadfile );
Echo 'file '. $ name.' uploaded successfully. image path: '. $ uploadfile .'
';

}
}
?>




The red part indicates the path of the three images that are successfully uploaded.
Then, in the image description, enter the description text. how can I submit the path of the three images together with the input image description to the database?
For example, if the database is picture, the corresponding fields are picid, p_explain (image description), s_pic (small image path), m_pic (), and B _pic (large Image path)
Upload database images and share them:

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.