Tell A Friend PHP Referrer – Recommend Site Script

by Hiroshi on June 16, 2008

in Referrer, Scripts

Recommend a page or website to a friend PHP script tutorial and script download.

Form Script

<form name=refer action="refer.php" method="POST">
<td align="center" valign="middle"><table width="600" border="0" cellspacing="0" cellpadding="0">
<td height="30" colspan="2"><strong>Your Details</strong></td>
<td height="30">Name:
<input name="fromName" type="text" id="fromName"></td>
<td height="30">E-Mail:
<input name="fromEmail" type="text" id="fromEmail"></td>
<td height="30" colspan="2"><strong>Friends Details</strong></td>
<td height="30">Name:
<input name="toName" type="text" id="toName"></td>
<td height="30">E-Mail:
<input name="toEmail" type="text" id="toEmail"></td>
<tr align="center">
<td height="30" colspan="2"><input type="submit" name="Submit" value="Refer"></td>

Referer Page Script

if ($fromEmail)
if ($fromName=='')
$subject= "Your friend has referred you this link from";
$subject= "$fromName has referred you this link from";
$message = "
Dear $toName,
Your friend $fromName has referred this link to you.
Please visit this link by clicking $ref
$from = "From: $fromEmail\r\n";
mail($toEmail, $subject, $message, $from);
header ("location:".$ref);

Put this script in some page and save it as referer.php and you are done.

Referrer, Recommend To A Friend PHP Script

Related Posts

Previous post:

Next post: