Jump to content

Please help me with my refer page


porko2004

Recommended Posts

Sorry for bugging everyone.

 

I'm really newbie with making emails send can anyone help me make a script please.

 

This is how the refer page looks.

 

http://58.173.92.23/test/index/referrals/referrals.htm

 

My friend sent me a example of the script but i don't understand it can anyone help me please.

 

<?


// do nothing to these variables; they collect information from the form
$Email = $_POST['Email'];
$Name = $_POST['Name'];
$F1Name = $_POST['F1Name'];
$F2Name = $_POST['F2Name'];
$F3Name = $_POST['F3Name'];
$F1Email = $_POST['F1Email'];
$F2Email = $_POST['F2Email'];
$F3Email = $_POST['F3Email'];

// subject line - add your own subject here ($name is the referrer name);

$subject = "This is a referral from $name";

// Referral message //
$referral_message = "
Look at this great site I found. I think you'll like it. <br>
<a href='http://www.conversionchronicles.com/'>http://www.conversionchronicles.com/</a><br>
";
// End of referral message //
$msg1 = "<font face='Verdana,Geneva,Arial,Helvetica,sans-serif' size='2' color='#000000'>
Hi $F1Name,<br>
$referral_message<br>
$Name<br>
<br>
</font>";
$mail1 = new mime_mail();
$mail1->from = $Email;
$mail1->headers = "Errors-To: [email protected]";
$mail1->to = $F1Email;
$mail1->subject = $subject;
$mail1->body = $msg1;
$mail1->send();
$msg2 = "<font face='Verdana,Geneva,Arial,Helvetica,sans-serif' size='2' color='#000000'>
Hi $F2Name,<br>
$referral_message<br>
$Name<br>
<br>
</font>";
$mail2 = new mime_mail();
$mail2->from = $Email;
$mail2->headers = "Errors-To: [email protected]";
$mail2->to = $F2Email;
$mail2->subject = $subject;
$mail2->body = $msg2;
$mail2->send();
$msg3 = "<font face='Verdana,Geneva,Arial,Helvetica,sans-serif' size='2' color='#000000'>
Hi $F3Name,<br>
$referral_message<br>
$Name<br>
<br>
</font>";
$mail3 = new mime_mail();
$mail3->from = $Email;
$mail3->headers = "Errors-To: [email protected]";
$mail3->to = $F3Email;
$mail3->subject = $subject;
$mail3->body = $msg3;
$mail3->send();
// If mail 1 at least is sent then inform the sender 
if($mail1) 
{ 
$Recipient_Email	= "[email protected]";
$Subject	= "Referral from $Name";
$Message = "A referral has been made from your web form.\n The referrer was; $Name with the email address $Email\n The recipients were; $F1Email $F2Email $F3Email";
$From = "$Email";
mail("$Recipient_Email","$Subject","$Message","From: $From");
}
// change return URL to your own thanks for referring a friend page.
$ReturnURL = "http://www.conversionchronicles.com/free_refer.php";
header("Location: $ReturnURL");
?>

Link to comment
https://forums.phpfreaks.com/topic/143218-please-help-me-with-my-refer-page/
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.