Simple File upload in PHP:storing file names in database

By | January 7, 2015

Step1: create a database called testlogin using phpmyadmin. Create a table using the following code execution through phpmyadmin query window

step2: create a folder called ‘fileupload’ and the following files under htdocs folder

htdocs
– fileupload

step3:create a folder ‘storage’ under ‘fileupload’ folder- set permission 777 for storage folder

htdocs
– fileupload
– storage

step3: create below php files under fileupload folder

htdocs
– fileupload
– storage
-index.php
-database_connection.php
– upload.php

index.php

database_connection.php

upload.php