You can save some times if you upload images through PHP and store it in your SQL database.
BLOB is Binary Large Object. The image that's been uploaded will be stored inside your SQL database in the form of binary. This kind of way saves your time. But, storing image in SQL database with BLOB is not always a good choice. Too many images that need to be loaded from your SQL might give impact to your database's loading time. So, please make a wise choice before choosing to store the images inside the SQL database. There are times where you should store the image into the SQL database and there are other times where you shouldn't to.
Before making any confusions especially for those who are still new in web programming and database, I would like to remind you of something. SQL (Structured Query Language) is programming language where we use it to do data manipulation in database. I believe some of you have heard about "MySQL". MySQL is one of RDBMS (Relational Database Management System) softwares that use SQL in it. So, SQL is programming language and MySQL is software. You may use other softwares such as Oracle or PostgreSQL and etc.
Ok. It is time for the tutorial. Please follow the following steps:
1. New Database
You need to make new database "upload" or any other names. 2. New Table
After that, you have to make new table inside the new database. Please make one new table "store" or any other names. The table should has the following structures:
We will make index.php ; img.php ; get.php
All set? You can access index.php to start uploading new image. After that, open img.php The view the images that have been uploaded.
That's all and Thank you. Good luck...