Mini Shell
<?php
require_once("../config.php");
if (isset($_REQUEST['upload']))
{
$name=$_FILES['uploadvideo']['name'];
$type=$_FILES['uploadvideo']['type'];
$cname=str_replace(" ","_",$name);
$newname=$cname.mt_rand();
$tmp_name=$_FILES['uploadvideo']['tmp_name'];
$target_path="video/";
$target_path=$target_path.basename($newname);
if(move_uploaded_file($_FILES['uploadvideo']['tmp_name'],$target_path))
{
echo $sql="INSERT INTO tbl_video(name,type) VALUE('".$newname."','".$type."')";
$result=$conn->exec($sql);
echo "Your video ".$cname." has been successfully uploaded";
}
}
?>
<form name="video" enctype="multipart/form-data" method="post" action="">
<input type="file" name="uploadvideo" />
<input type="submit" name="upload" value="SUBMIT" />
</form>
Zerion Mini Shell 1.0