dniwebdesign
03-02-2006, 08:32 AM
$copy = copy($_FILES['imagefile']['tmp_name'], "../gallery_videos/".$_FILES['imagefile']['name']) or $error="Could not copy video file, please contact us.";
echo "<br>".$error."<br>";
if($copy)
{
return "<font color='#006600'>The video was added to the database and has been uploaded.</font>";
//Upload the Screenshot
$copy = copy($_FILES['screenfile']['tmp_name'], "../gallery_videos/".$_FILES['screenfile']['name']) or $error="Could not copy video file, please contact us.";
echo "<br>".$error."<br>";
if($copy)
{
return "<font color='#006600'>The video was added to the database and has been uploaded.</font>";
}
else
{
return "<font color='#006600'>The video was added to the database.</font><br><font color='#FF0000'>The video file was not uploaded.<br>Please make sure the file is under 8 Megabytes and if it is<br>contact the webmaster.</font>";
}
}
else
{
return "<font color='#006600'>The video was added to the database.</font><br><font color='#FF0000'>The video file was not uploaded.<br>Please make sure the file is under 8 Megabytes and if it is<br>contact the webmaster.</font>";
}
I have the above code snippet, now... I am trying to upload two files through one POST request... seems simple enough... however. <_< It uploads the first file (IE: $_FILE['imagefile'] ) but will not upload the $_FILE['screenfile'] . Why won't it work?
Yes... I know my $_FILE['screenfile'] is correct as it adds the correct URL to the database to find the file, it just won't upload the screenfile, file.
echo "<br>".$error."<br>";
if($copy)
{
return "<font color='#006600'>The video was added to the database and has been uploaded.</font>";
//Upload the Screenshot
$copy = copy($_FILES['screenfile']['tmp_name'], "../gallery_videos/".$_FILES['screenfile']['name']) or $error="Could not copy video file, please contact us.";
echo "<br>".$error."<br>";
if($copy)
{
return "<font color='#006600'>The video was added to the database and has been uploaded.</font>";
}
else
{
return "<font color='#006600'>The video was added to the database.</font><br><font color='#FF0000'>The video file was not uploaded.<br>Please make sure the file is under 8 Megabytes and if it is<br>contact the webmaster.</font>";
}
}
else
{
return "<font color='#006600'>The video was added to the database.</font><br><font color='#FF0000'>The video file was not uploaded.<br>Please make sure the file is under 8 Megabytes and if it is<br>contact the webmaster.</font>";
}
I have the above code snippet, now... I am trying to upload two files through one POST request... seems simple enough... however. <_< It uploads the first file (IE: $_FILE['imagefile'] ) but will not upload the $_FILE['screenfile'] . Why won't it work?
Yes... I know my $_FILE['screenfile'] is correct as it adds the correct URL to the database to find the file, it just won't upload the screenfile, file.