View Single Post
Old 13th February 16, 05:00 PM   #2
meesa
WLC Mod
 
meesa's Avatar
 
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,710
Default Re: How can I upload image with other data from my form?

Check out this tutorial on how to upload the file:

https://davidwalsh.name/basic-file-uploading-php

Then, don't try to put the image itself into the database. Save it in a folder outside of the main root (where index.html is) and put only the path to it in the database.

Also, you should look into use PDO or SQLite, as the MySQL_* methods are depreciated in PHP now.
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum.
meesa is offline   Reply With Quote