Skip to main content

Upload Video Form in PHP


In this simple project you can learn how to upload a video, store it to your database and play video. The users can only upload a video format in mpg, wma, mov, flv, mp4, avi, qt, wmv, and rm. The maximum video file size to be upload is 10mb. This project is created using PHP in PDO query.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted byAnonymous (not verified)on Wed, 04/26/2017 - 21:37

Very good, there is an Open source video sharing written in PHP.

Download :
Demo :

Submitted bykostia (not verified)on Fri, 12/29/2017 - 19:51

in php.ini change to:
post_max_size = 500M
upload_max_filesize = 500M

Submitted byLeeDavis (not verified)on Thu, 10/25/2018 - 01:43

@Sachhidanand Gupta & Mari Guna - you would increase the size of submitted video in the line: $size = $_FILES['file']['size'] /1024/1024; - add 3 more /1024 if you want to increase the video size to 5MB. For each target video size, add another /1024 to the end of the $size variable (each 1024 represents a megabyte). I was really stumped by this until a trip to Stack Overflow cleared up the confusion. Hope this helps...

Submitted byLeeDavis (not verified)on Thu, 10/25/2018 - 01:49

@Jeprox - thanks for this great script. Happy to say I have it working on the homepage of my domain @ promodrone(dot)com. Have figured out how to increase the submission size limits and it's working like a champ! I'd been looking for this for quite awhile when I realized I'd downloaded it months ago and was sitting my downloads folder (lol!). Glad I found this, it'a a perfect way to give your users the chance to publish small, promo videos and keep all content onsite. Also managed to split up the script so that the upload panel is behind a secured Users' page and the video modal lives out front in the public area. Thanks again for this great work!

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.