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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.