Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

PHP MySQL Upload File – image and PDF

PHP MySQL Upload File – image and PDF

To upload a file (image or PDF etc), we need to make one PHP file and folder for storing the images.

PHP image PDF

Code of upload.php

 mysqli_query($conn,"insert into store(file)values('$file')");	
<form enctype="multipart/form-data" method="post">
File Upload:<input type="file" name="file">
<input type="submit" name="submit" value="upload">

Database View for PHP MySQL Upload File

PHP MySQL Upload File - image and PDF

Figure: PHP MySQL Upload File – image and PDF

Here, “uploadfile” is the database. “store” is the table name. Similarly, file is the attribute of the table store.

Fazal Rehman Shamil Click Here to Know More
Instructor, Researcher, Blogger, SEO Expert, Poet and Publisher of International Journal Of Software, Technology & Science ISSN : 2616 - 5325
Dear Professors and Resarchers!You are welome to Cite these tutorials in your research or slides etc. Please don't forget to mention the reference of website. Copy Paste of text is strcitly forbidden. Images can be reuse because images are protected with watermark.