That's pretty complicated if you don't have any idea how to start.
But here we go:
The link page
Put this javascript in the HTML
<script language="JavaScript">
function popup(url)
{
var style = "height=500, width=500, location=no, scrollbars=no, menubars=no, toolbars=no, resizable=yes";
window.open(url, "", style);
}
</script>
a link in page like this:
<a href="javascript:popup('sendfriend.php')">Send to a friend</a>
sendfriend.php
if ($_POST['submit']) {
$your_name = stripslashes(trim($_POST['your_name']));
$your_email = stripslashes(trim($_POST['your_email']));
$friend_name = stripslashes(trim($_POST['friend_name']));
$friend_email = stripslashes(trim($_POST['friend_email']));
if ($your_name == "")
die("Your name is empty");
if ($your_email == "")
die("Your email is empty");
if ($friend_name == "")
die("Friend's name is empty");
if ($friend_email == "")
die("Friend's email is empty");
$message = "Hi $friend_name, your friend $your_name want you to see this interesting page <a href=\"http://www.phpbuilder.com\">http://www.phpbuilder.com</a>";
@mail($friend_email, "You got a invitation!", $message, "From: $your_email\r\n");
echo "Your invitation has been sent.";
} else {
// display the form here
.... .... ....
}
That's just a scratch, hope it makes sense. It only sends the link of the page, not the whole HTML file.