Simple File upload in PHP:storing file names in database
Step1: create a database called testlogin using phpmyadmin. Create a table using the following code execution through phpmyadmin query window
1 2 3 4 5 |
CREATE TABLE IF NOT EXISTS `tbl_file_storage` ( `id` int(11) NOT NULL AUTO_INCREMENT, `filename` varchar(250) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |
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ā¦ Read More »