Apparently im no good at scripting, i have 2 problems with this one and once again any help would be appreciated:
Im making an upload box so folks can upload there own mp3's to the site, i followed the text tutorial and again copy and pasted the script i had taken from the help page i now get this:
I saved this script as php script in a wordpad file, the script looks like this:
<?php
// Receiving variables
@$email = addslashes($_POST['email']);
@$upload_Name = $_FILES['upload']['name'];
@$upload_Size = $_FILES['upload']['size'];
@$upload_Temp = $_FILES['upload']['tmp_name'];
// Validation for max file size
if ($upload_Size>0)
{
if( $upload_Size >100000000)
{
//delete file
unlink($upload_Temp);
header("Location: error.html");
exit;
}
$uploadFile = "uploads/".$upload_Name ;
@move_uploaded_file( $upload_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload_URL = "http://www.stream-memobile.com/uploads/".$upload_Name ;
}
//Sending Email to form owner
$mailto = "nicholasmdobbs********.com";
$mailsubj = "music";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "upload: $upload_URL\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
header("Location: thankyou_page.html");
?>
Sorry for being a challenge i appreciate all the help,
Thanks,
Nick
Im making an upload box so folks can upload there own mp3's to the site, i followed the text tutorial and again copy and pasted the script i had taken from the help page i now get this:
I saved this script as php script in a wordpad file, the script looks like this:
<?php
// Receiving variables
@$email = addslashes($_POST['email']);
@$upload_Name = $_FILES['upload']['name'];
@$upload_Size = $_FILES['upload']['size'];
@$upload_Temp = $_FILES['upload']['tmp_name'];
// Validation for max file size
if ($upload_Size>0)
{
if( $upload_Size >100000000)
{
//delete file
unlink($upload_Temp);
header("Location: error.html");
exit;
}
$uploadFile = "uploads/".$upload_Name ;
@move_uploaded_file( $upload_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload_URL = "http://www.stream-memobile.com/uploads/".$upload_Name ;
}
//Sending Email to form owner
$mailto = "nicholasmdobbs********.com";
$mailsubj = "music";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "upload: $upload_URL\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
header("Location: thankyou_page.html");
?>
Sorry for being a challenge i appreciate all the help,
Thanks,
Nick
Comment