Jump to content
Sign in to follow this  
brown234

how to upload multiple image,preview image

Recommended Posts

You'd start off with multiple <input type="file"> elements, you'd have some PHP code which gets the files from the $_FILES array and saves them into specific directories. You would then have some code to write the paths of the saved files into the database along with any other information about the image. On other pages of your site, you would have some code that pulls image information from the database and prints <img> tags with the saved paths.

Here are the tutorials you should read to accomplish these tasks.

All this assumes you know the basics: variables, loops, functions. If you don't know the basics, just read the whole PHP tutorial from start to end.

Share this post


Link to post
Share on other sites

You just need to write out an img tag with the correct URL to the image.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...