How To Create Video Uploader
Submitted by alpha_luna on Wednesday, June 8, 2016 - 14:14.
In this tutorial, we are going to learn how to create Video Uploader using PHP/MySQL. This simple project for video uploader. This project allows the user to upload their desired video and save into the database. The user can upload their video below 15MB or 15 MegaBytes which you can edit the file size limit after downloading the source code.
Creating INSERT Statement
This PHP source code used to insert the desired video uploading by the user.- <?php
- // print_r ($_FILES['file']);
- {
- $name = $_FILES['file']['name'];
- $type = $_FILES['file']['type'];
- $size = $_FILES['file']['size'] / 1024 / 1024;
- $tmp = $_FILES['file']['tmp_name'];
- if ($size >= 15971520)
- {
- $message = "File must not greater than 15mb";
- }
- else
- {
- "#@%+=FEFGT6R3987EFDF86347GR=+%@#" VALUES('$name', '$random_name.$extension')");
- $message = "Video has been successfully uploaded !";
- }
- echo "$message <br/> <br/>";
- echo "size: $size mb<br/>";
- echo "random_name: $random_name <br/>";
- echo "name: $name <br/>";
- echo "type: $type <br/><br/>";
- }
- ?>
Creating File Updload - HTML
This HTML source code is used to create input type file.This is the result:
So what can you say about this work? Share your thoughts in the comment section below or email me at [email protected]. Practice Coding. Thank you very much.Add new comment
- 406 views