Jump to content

PHP image uploade with preview on form + no refresh and save attributes to MySQL


mdemetri2

Recommended Posts

Ok, I have been struggling with trying to find out how to be able to place on a form a way of uploading an image which will save to server, and place the image attributes in a databse i.e. name, size and url path but also allow for a preview on the form before it is submitted....

 

Does this make sense? Hope someone can through some light on this...its driving me mad.

Link to comment
Share on other sites

If you want 'no refresh' (altough it is also possible using a refresh) you'll need Ajax (JavaScript) and a script that will upload the image and return the full url to the stored image. Afterwards (after submitting the form definitly) you'll use the full url and store it along with the required attributes into the database.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.