Hi guys,
I got this script from CaptianChaos and a big shout out to him for his help.
The problem I am running into is that the refer email is only showing part of the address.
Example. actual address: http://www.mydomain.com/test/index.php?event_id=12
What is sent: test/index.php?event_id=12
Is there a simple way to get it to say the whole address? Or should I just cheat and put http://www.mydomain.com in front of the $_SERVER['REQUEST_URI'] in the message?
<?php
if ($_POST['addr']) {
mail($_POST['addr'], 'Site Recommended', 'Someone has recommended this site to you:' .$_SERVER['REQUEST_URI']);
print $_POST['addr']. "notified<br>\n";
// log it:
$fp = fopen("log.txt", "a");
fputs($fp, $_POST['addr']." notified about ".$_SERVER['REQUEST_URI']);
fclose($fp);
}
?>
<form method="POST" action="<?=$_SERVER['REQUEST_URI']?>">
Tell a friend about this event: <input type="text" name="addr">
<input type="submit" value="Click here to tell your friend">
</form>