Script Source Code
 

'Collection of scripts

on the net!'

Home

Information

Contact

FAQ

About

Main Menu

Redirection Script

Simple Quiz

Password Protection Script

Date and Time Script

Other Date Functions Script

Little Spy Script

Visitor Count Script

Unique Visitor Count Script

Contact Us Script

Refer A Friend Script

PHP Template Driven System

testing playground


Refer a Friend

Refer a Friend
Simple Refer a Friend script. Save this script as "refer.php".
<?php
$status="Refer a Friend :";
$subject="Great website I have found !";
$test=$HTTP_POST_VARS["ftest"];
$name=$HTTP_POST_VARS["fname"];
$mail = array ($HTTP_POST_VARS["fmail1"], $HTTP_POST_VARS["fmail2"],
$HTTP_POST_VARS["fmail3"] );
$comment=$HTTP_POST_VARS["fcomment"];
$body=$comment."\n".$name;
if ($test=="1"){
for ( $k=1; $k<=3; $k++ ){
mail($mail[$k],$subject,$body);}
$status="Thank you !";}
?>
<html><head>
<title>Refer a Friend Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body>
<form name="form1" method="post" action="refer.php">
<table width="75%" border="0" cellpadding="4" cellspacing="0" bgcolor="#EEEEEE">
<tr> <td width="30%">&nbsp;</td>
<td width="70%"><?php print $status; ?></td>
</tr><tr>
<td width="30%"><div align="right">Your Name :</div></td>
<td width="70%"><input name="fname" type="text" id="fname"></td>
</tr><tr>
<td>&nbsp;</td>
<td>Tell these friends about our website :</td>
</tr><tr>
<td width="30%"><div align="right">E-Mail 1 : </div></td>
<td width="70%"><input name="fmail1" type="text" id="fmail1"></td>
</tr> <tr>
<td><div align="right">E-Mail 2 : </div></td>
<td><input name="fmail2" type="text" id="fmail2"></td>
</tr> <tr>
<td><div align="right">E-Mail 3 : </div></td>
<td><input name="fmail3" type="text" id="fmail3"></td>
</tr><tr>
<td width="30%"><div align="right">Comment : </div></td>
<td width="70%"><textarea name="fcomment" id="fcomment">Hi,
I have found an interesting website.
Hope you will like it, too.
Regards,</textarea></td>
</tr> <tr>
<td width="30%">&nbsp;</td>
<td width="70%"><input type="submit" name="Submit" value="Submit"> <input name="ftest"
type="hidden" id="ftest" value="1"></td>
</tr></table></form></body></html>

News Update!

Data Cleaner

Multi Mirror File Sharing

Invaluable Links

 


 

Copyright 2009 scriptsourcecode.com


SEO Toronto