Jump to content

how to send a second email


bitt2delcid

Recommended Posts

Hello, i have been looking for and answer on the internet but i couldn't find it! I'm new on PHP based on and example i wrote something like this for my website:

 

//basic variables

$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));

$EmailTo = "[email protected]";

$Subject = "Registration u10";

$teamname = Trim(stripslashes($_POST['teamname']));

$affiliation = Trim(stripslashes($_POST['affiliation']));

$premier = Trim(stripslashes($_POST['premier']));

$challenge = Trim(stripslashes($_POST['challenge']));

$girls = Trim(stripslashes($_POST['girls']));

$boys = Trim(stripslashes($_POST['boys']));

 

//about 15 more variables go in here but i don't want to put them to save some space

 

// validation

$validationOK=true;

if (Trim($EmailFrom)=="") $validationOK=false;

if (!$validationOK) {

  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";

  exit;

}

 

// email body text

//this includes the info of all the variables at the top even the ones I didn't write in here (but you get the point  ;) )

 

$Body = "";

$Body .= "Team Name: ";

$Body .= $teamname;

$Body .= "\n"; $Body .= "\n";

 

 

$Body .= "AYSleague: ";

$Body .= $aysleague;

$Body .= "\n"; $Body .= "\n";

 

$Body .= "Flash Tournament: ";

$Body .= $flashtournament;

$Body .= "\n"; $Body .= "\n";

 

$Body .= "Spring 2011: ";

$Body .= $spring2011;

$Body .= "\n"; $Body .= "\n";

 

$Body .= "Summer 2011: ";

$Body .= $summer2011;

$Body .= "\n"; $Body .= "\n";

 

$Body .= "fall 2011: ";

$Body .= $fall2011;

$Body .= "\n"; $Body .= "\n";

 

// send email to my inbox with the information above

 

$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

 

// if everything goes OK it will redirect them to another page

 

if ($success){

  print "<meta http-equiv=\"refresh\" content=\"0;URL=thanksu12.html\">";

}

 

else{

  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";

}

?>

 

the problem that i have is:

(i divided it in 2 sections)

1- i need to sent a second email to the coach

2- that email only needs to have the information of 6 variables not the whole thing

 

I don't know how to do it, if someone knows how to do it, i will appreciate some help!!

 

thanks! 8)

Link to comment
https://forums.phpfreaks.com/topic/224399-how-to-send-a-second-email/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.