Jump to content

Search the Community

Showing results for tags 'trying to insert the video'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. hey yall, im trying to insert a video from a form but its not inserting, im using the same script and method that i use from my image gallery which worked wonderful so this is what i have so far $error = 'Error: '; if(isset($_GET['valbum_id'])){ $vid = $_GET['valbum_id']; $vget = mysqli_query($con, "SELECT * FROM valbums WHERE valbum_id='$vid'") or die($error . mysqli_error($con)); }elseif(isset($_POST['valbum_id'])){ $vid = $_POST['valbum_id']; $vpost = mysqli_query($con, "SELECT * FROM valbums WHERE valbum_id='$vid'") or die($error . mysqli_error($con)); }else{ echo 'You did not select a album'; } if(isset($_POST['vid_sub'])){ $vupload = $_FILES['vidloader']['name']; $vsize = $_FILES['vidloader']['size']; $vtype = $_FILES['vidloader']['type']; $vtemp = $_FILES['vidloader']['tmp_name']; // define the formats, extension and size $vall = array('mov', 'wmv', 'mp4', 'mpeg', 'flv', 'avi'); $vext = end(explode('.', $vupload)); $vmax = 1073741824; // check if the variable is empty if(empty($vupload)){ echo 'Kindly Select a file'; }elseif(($vtype == $vall)){ echo 'this format is not allow'; }elseif(($vsize > $vmax) || ($vsize < 0)){ echo 'This File is too large, max size is 1 Gigabytes only'; }else{ $vinsert = mysqli_query($con, "INSERT INTO movie VALUES('', '1', '$vid', now(), '$vext')") or die($error . mysqli_error($con)); // move the uploaded file to the main folder $video_id = mysqli_insert_id($con); $video_file = $video_id . '.' . $ext; $dir = move_uploaded_file($vtemp, 'pages/videos/' . $vid . '/' . $video_file); } } i dont have any errors or anything but its not inserting the video into the database nor move the temp video to the folder, can anyone help me here?
×
×
  • Create New...