Jump to content

video upload


etsted

Recommended Posts

just like in your last post, try searching. really it's no difference if you search for images, PDF, video, etc though. the filetype is usually irrelevant if you are doing file uploads, other than just typically validating the extension. but anyway, here's what i found on google. just like your last post, but changed it to video instead of image.

https://www.google.com/#q=video+uploader+php&safe=off&tbm=vid

 

and file upload in general

http://www.w3schools.com/php/php_file_upload.asp

http://www.php.net/manual/en/features.file-upload.php

 

try something out, then let us know where you get stuck and show the code you tried.

Edited by thescientist
Link to comment
Share on other sites

Notice: Undefined index: pictures in /opt/lampp/htdocs/magazine/upload.php on line 2Notice: Undefined index: pictures in /opt/lampp/htdocs/magazine/upload.php on line 3

 

 

 

<?php

$tmp_name =$_FILES ['pictures']['tmp_name'];
$uploadfilename = $_FILES ['pictures']['name'];
$savedate=date('mdy-Hms');
$newfilename = '/pictures/'.basename($savedate."_".$uploadfilename);
if (move_uploaded_file($tmp_name, $newfilename)){
echo "<p> file terupload</p>n";
}
?>
what is problem ?
Link to comment
Share on other sites

the error seems to make it pretty clear. you don't have an index in the $_FILES array called pictures. What do you get if you output $_FILES, like with var_dump? Did you give your input file element in your HTML a name of pictures?

 

You should really be testing for errors in the $_FILES array too.

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...