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 = "example@mysite.org";

$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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.