Registration form with image upload in php source code
- display uploaded file in php
- view uploaded file in php
- view uploaded pdf file in php
- how to display uploaded image in php
Image upload in php.
File Upload, View and Download using PHP and MySQL
Hi!
Upload file in php
In this tutorial let me show you about upload, view and download file in php and mysql. The file uploading process is similar to what we have discussed here, but this php script not only uploads file to the server but also stores the file path and its created date in mysql database.
Apart from uploading file, it also gives you the option to view file on browser and download it from server.
With PHP you can practically upload any type of files and the file uploading script I have shared below will work for all file types like PDF, Document, Images, MP3, Videos, Zip archives etc.
Just include those file extensions in the filtering process ( array) and you will be able to upload them.
How to Upload, View & Download File in PHP & MySQL?
Let's move on to the coding part. First you should create mysql database to store file details.
Create MySQL Database:
CREATE DATABASE `demo` ; Use `demo`; CREATE TABLE IF NOT EXISTS `tbl_files` ( `id` int(9) NOT NULL AUTO_INCREMENT, `filename` varchar(255) NOT NULL, `created` datetime NO- php display uploaded file
- show uploaded files php