Are there any good free 'Send this Page to Your Friend' scripts available? I found some but they open in another page. I like the one which is on the search page of Indeed dot com. (See attached). Small fast. Thanks in advance for your help.
make the form, post it to your script for your script take a mail script, check both are email address, grab the refer link and send
I'm not sure how I should do it, but it should be something like this: Save as 'sendfriend.php': <?php if(!defined("SENDFRIEND")) die("Not allowed."); $page = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']; if(isset($_POST['from'], $_POST['to'])) { $from = $_POST['from']; $to = $_POST['to']; $msg = "$from sent you this page link: $page"; $headers = "From: $from"; if(mail($to, "Your friend sent this page!", $msg, $headers)) echo "Successfully sent!"; else "Failed."; } ?> <form action="" method="POST"> <h4>Send this Page to Your Friend</h4> From this email address:<br /> <input type="text" name="from" /><br /> To this email address:<br /> <input type="text" name="to" /><br /> <input type="submit" value="Submit!" /> </form> PHP: Make sure you define and include it in your PHP file (the page you wanna send) like this: define("SENDFRIEND",TRUE); include 'sendfriend.php'; PHP: