• Coding
  • Upload a picture through PHP/MySQL

Hello

i am working on a small application, the user must insert some date and upload a photo. i am new on php and web applications. So how can i do it ?

-The user will fill some text field and choose the destination of the JPEG photo and then click on submit.

Thank you guys.
When it comes to images, you can store them in the database as a BLOB type(putting the actual image in the database) or store them in a folder and put the path in the database.

This is one of the best tutorials out there because it's simple and clean :
Step by step tutorial

This one is for BLOB uploads
Photo Upload using BLOB

If you need any help let me know :)
Cpt.Majed wroteWhen it comes to images, you can store them in the database as a BLOB type(putting the actual image in the database) or store them in a folder and put the path in the database.

This is one of the best tutorials out there because it's simple and clean :
Step by step tutorial

This one is for BLOB uploads
Photo Upload using BLOB

If you need any help let me know :)

thank you bro :)
Do not store the image in the database instead, upload the image to the server directory and save the image name inside the database.
So the table will contain a varchar(MAX) and in it you will save the name of the image "avatar_1.jpg".

http://www.w3schools.com/php/php_file_upload.asp
There are better choices than storing the files to disk on the server. A far more flexible option is to use an object store, like Amazon S3 or Rackspace Cloud Files. It provides a more flexible and a LOT more reliable way than just assuming that your server's disk won't ever crash.
rahmu wroteThere are better choices than storing the files to disk on the server. A far more flexible option is to use an object store, like Amazon S3 or Rackspace Cloud Files. It provides a more flexible and a LOT more reliable way than just assuming that your server's disk won't ever crash.
Thanks for the share :)
thank you guys :) !!