So, we are going to try to upload image through PHP, and then save the uploaded image into a folder in the computer, and the save the folder's location in the SQL database.
It's quite easy. Please prepare your SQL database anda also any file editor that you always use.
All set? These are the steps: 1. Create New Database
Create new database "upload2" or any other names that you like. after that, create new table "store" or any other names that you like. And please make sure that the table "store" has the following structures:
2. PHP Files
You will create 4 PHP files:
Here's how it works. The File "index.php" is the main file where you will choose which image that you want to upload. After that, once you've clicked on the submit button, the file "upload.php" is responsible when the uploading process starts. The File "view.php" will be used to view the images that have been uploaded. and the file "edit.php" will be used to replace a current particular image into a new image.
Once you've done all of the files, use the file "index.php" to start uploading images. after that, use the file "view.php" to view the uploaded images. and lastly, please use the file "edit.php" to replace a current particular image with another image.