|
how do i add another recipient to my php script? -
December 21st, 2007
<?php
// get posted data into local variables
$EmailFrom = "from@host.com ";
$EmailTo = "To_me1@yahoo.com" ;
$Subject = Trim(stripslashes($_POST['Subject']));
$Message = Trim(stripslashes($_POST['Message']));
$Email = Trim(stripslashes($_POST['Email']));
$IP = $_SERVER['REMOTE_ADDR'];
// prepare email body text
$Body = "";
$Body .= " ";
$Body .= $Message;
$Body .= "\n";
$Body .= " \n\nFrom $Email\n\n";
$Body .= "IP=$IP";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
}
?>
ok so far i have one email in the $EmailTo but how do i add another one ive tried seperating with a comma. and something with /r/n. any idea
ty
i would like to use the same script i have just how do i add another recipient?
|