|
// Change the variable below to "no" if you do not wish to write
// the data to a text log
$logging="no";
// Enter the website administrators email address here
$adminaddress = "magic@unicef.org";
// Enter the company name or site name here
$sitename = "The MAGIC website";
// Enter the address of your website here
$siteaddress ="http://www.unicef.org/magic";
IF ($action=="") {
$referer = getenv("HTTP_REFERER");
print " $referer ";
?>
To send the address of the page you have just visited
shown above and a brief message to friends who might like
it, fill in the form below.
Note: We only request your name and email address so that
the person you are recommending the page to knows that it is not
junk mail. All fields marked with an asterisk (*) are required.
You must enter at least one friend's name and email.
} ELSEIF ($action="Send") {
if (($yname=="") || ($fname=="") || ($femail=="")|| ($yemail=="")) {
print "Please use your back button and complete all of the required fields. ";
} else {
// cycle through the emal addresses and names
$items="4";
$tally="";
for ($numitems=0; $numitems < $items; $numitems++) {
if (($fname[$numitems]!="") && ($femail[$numitems]!="")) {
mail("$femail[$numitems]","A website recommendation from $yname","$fname[$numitems] \n\n$yname visited $sitename and thought you would be interested in this page:\n \nURL: $url \n\nMessage: \n------------------------------------ \n$comments \n------------------------------------\n\nThank you. \n$sitename \n$adminaddress \n$siteaddress","FROM:$yemail");
IF ($logging=="yes") {
$filename="url-log.txt";
// Nothing needs ot be changed here
$fl=fopen($filename,"a+");
// sets the pipe delimiters
fwrite($fl,"'$url'|'$femail[$numitems]'|'$yemail'|'$comments'\n");
fclose($fl);
}
$tally.="$fname[$numitems], ";
}
}
?>
Your recommendation has been sent.
">Return to page
}
}
?>

MAGIC
partners | Privacy
policy | Top

|