RickHope Posted April 7, 2007 Share Posted April 7, 2007 How do i edit my php code so that i send it to [email protected] as well as the email that they input? <?php include("header.html"); @$Name = addslashes($_POST['Name']); @$email = addslashes($_POST['email']); @$upload_Name = $_FILES['upload']['name']; @$upload_Size = $_FILES['upload']['size']; @$upload_Temp = $_FILES['upload']['tmp_name']; @$upload_Mime_Type = $_FILES['upload']['type']; @$upload_Name =md5(time().$upload_Name); function RecursiveMkdir($path) { if (!file_exists($path)) { RecursiveMkdir(dirname($path)); mkdir($path, 0777); } } if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email)) { die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid email</font></p>"); } if($upload_Size == 0) { die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid upload</font></p>"); } // FILE SIZE LIMIT if( $upload_Size >15000000) // ------------- { unlink($upload_Temp); die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Music type not supported, please enter a valid upload</font></p>"); } if( $upload_Mime_Type != "audio/x-mpegurl" AND $upload_Mime_Type != "audio/32kadpcm" AND $upload_Mime_Type != "audio/basic" AND $upload_Mime_Type != "audio/DAT12" AND $upload_Mime_Type != "audio/G.722.1" AND $upload_Mime_Type != "audio/L16" AND $upload_Mime_Type != "audio/L20" AND $upload_Mime_Type != "audio/x-ms-wma" AND $upload_Mime_Type != "audio/x-wav" AND $upload_Mime_Type != "audio/wav" AND $upload_Mime_Type != "audio/L24" AND $upload_Mime_Type != "audio/MP4A-LATM" AND $upload_Mime_Type != "audio/mpa-robust" AND $upload_Mime_Type != "audio/parityfec" AND $upload_Mime_Type != "audio/prs.sid" AND $upload_Mime_Type != "audio/telephone-event" AND $upload_Mime_Type != "audio/tone" AND $upload_Mime_Type != "video/mp4" AND $upload_Mime_Type != "audio/mpeg" AND $upload_Mime_Type != "audio/x-mpeg" AND $upload_Mime_Type != "audio/mp3" AND $upload_Mime_Type != "audio/x-mp3" AND $upload_Mime_Type != "audio/mpeg3" AND $upload_Mime_Type != "audio/x-mpeg3" AND $upload_Mime_Type != "audio/mpg" AND $upload_Mime_Type != "audio/x-mpg" AND $upload_Mime_Type != "audio/x-mpegaudio" ) { unlink($upload_Temp); die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Temp upload error, please enter a valid upload</font></p>"); } $uploadFile = "files/".$upload_Name ; if (!is_dir(dirname($uploadFile))) { @RecursiveMkdir(dirname($uploadFile)); } else { @chmod(dirname($uploadFile), 0777); } @move_uploaded_file( $upload_Temp , $uploadFile); chmod($uploadFile, 0644); // DOMAIN $upload_URL = "http://www.p2mupload.com/upload/files/".$upload_Name ; //------------ $pfw_header = "From: [email protected]"; $pfw_subject = "Your Music Code - Uploaded @ P2Mupload.com"; // EMAIL ADDRESS $pfw_email_to = "$email"; //------------ $pfw_message = "Your Name: $Name\n" . "Your Email: $email\n" . "Upload URL: $upload_URL\n\n\n" . "Copy all the code below and paste it into your webpage's HTML box.\n\n\n" . "<table border=\"0\" width=\"287\"><tr><td width=\"281\"><embed style=\"FILTER: xray\" name=\"RAOCXplayer1\" width=\"281\" height=\"43\" src=\"$upload_URL\"autostart=true ShowStatusBar=false ShowControls=true Cache=True loop=\"false\" type='application/x-mplayer2' volume=\"65\"><a href=\"http://www.playin2much.co.uk\"><img border=\"0\" src=\"http://www.p2mupload.com/images/userbar.gif\" width=\"281\" height=\"20\"></a></div></tr></table>\n\n\n\n\n" . "Thanks Rick Hope, Owner of P2Mupload.com\n" . "[email protected]"; @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ; echo("<p align='center'><font face='Arial' size='3' color='#FFFFFF'>Your audio file has been uploaded, Please check your email & junk email folder, Press back to upload another.</font></p>"); include("footer.html"); ?> Link to comment https://forums.phpfreaks.com/topic/46023-hot-to-add-2-email-repicants/ Share on other sites More sharing options...
Psycho Posted April 7, 2007 Share Posted April 7, 2007 $pfw_email_to = "$email, [email protected]"; Link to comment https://forums.phpfreaks.com/topic/46023-hot-to-add-2-email-repicants/#findComment-223616 Share on other sites More sharing options...
RickHope Posted April 7, 2007 Author Share Posted April 7, 2007 $pfw_email_to = "$email, [email protected]"; cheers pal works perfect much aprichated Link to comment https://forums.phpfreaks.com/topic/46023-hot-to-add-2-email-repicants/#findComment-223625 Share on other sites More sharing options...
Psycho Posted April 7, 2007 Share Posted April 7, 2007 Be sure to use the link at the bottom to mark the thread as solved. Link to comment https://forums.phpfreaks.com/topic/46023-hot-to-add-2-email-repicants/#findComment-223660 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.