Jump to content

[SOLVED] Uploading Vidoe


TecTao

Recommended Posts

I'm needing to upload videos as part of a membership.  The upload script I'm using for jpg works fine.  When I change the extension and change the max size to 2mgb, nothing uploads.

 

Here's the script on the form page:

 

<input name="id_7" type="hidden" value="<? echo "$id_7" ?>">

<input type="hidden" name="MAX_FILE_SIZE_7" value="5000000">

<input name="upfile_7" type="file" size="60"></td>

 

Here's the post page script:

 

$lid_7=$_POST['id_7'];

$uploaddir_7 = "../query/media/$boxDir/";

$filename_7 = trim($_FILES['upfile_7']['name']);

$filename_7 = substr($filename_7, -80);

$filename_7 = ereg_replace(" ", "", $filename_7);

if ((ereg(".jpg", $filename_7)) || (ereg(".wmv". $filename_7))) {

$uploadfile_7 = $uploaddir_7 . $filename_7;

if (move_uploaded_file($_FILES['upfile_7']['tmp_name'],

$uploadfile_7)){

chmod($uploadfile_7, 0644);

print("Sixth File upload was successful");

 

mysql_query(" UPDATE network_members_media SET vid_1='$filename_7', vid_1_app = 'No' WHERE i_Mid='$lid_7'");

} else {

print("Sixth File upload failed");

}

} else {

print("<B>WARNING INDICATES THERE WAS NO FILE TO UPLOAD</b> ");

}

 

As you can see, part of the upload's success is inserting the file name into the database.  The reason I'm using an UPDATE, is that there are seven inserts with the first INSERT setting up the row of the DB With the member ID number and the each image and video Updating the row with the name and an approval.

 

As mentioned, the problem is the wmv files won't upload.

 

Thanks in advance.

Mike

TecTao Designs

Link to comment
https://forums.phpfreaks.com/topic/42167-solved-uploading-vidoe/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.