PDA

View Full Version : Refer-A-Friend script


bgoverman
09-24-2002, 03:58 PM
I have a tell-a-friend image on my site and would like to have an email open up -- when clicked -- with just the subject and a message (including the website being referred). the user can then just fill in the email address where he would like it sent.

I don't want a form page. Thanks

Bob
09-24-2002, 04:18 PM
Hello,

This is a simple mailto tag that will open up the visitors default email client with information prefilled:

<a href="mailto:?subject=Hey I just Visited this cool web site&body=I just visited this cool web site at http://www.example.com.">Tell a Friend</a>

There are pros and cons to this method which is why most businesses now use forms for submitting information but it does still work :)

You can change the Subject that will be inserted into the email by changing the text after ?subject= and also change the Body contents by changing the text after &body=.

Hope this helps,
Bob

bgoverman
09-25-2002, 10:27 AM
Thanks Bob. I appreciate your help. I am putting a site together for a non-profit hospital foundation and would like to make it as easy as possible for people to refer the site. If there is a simple way to use a form to do it, I'd look at it.

I am also lokking for an easy way to let people donate, on line, without the expense of merchant banks, etc. The best I can do now id refer to a form that can be filled out, printed and mailed or faxed. If you jave a better idea, please let me know

Thanks again

Barry

Jag
09-25-2002, 11:03 AM
The following is a simple PHP mail form, it will allow your users to quickly and easily send e-mails to whoever they want to from your web page. 8}


<?PHP
If ($done)
{
mail("$to", "$subject", "$content", "FROM: $from");
die("E-Mail $subject Sent.");
}
?>
<html>
<head>
<title>Send Me An E-mail</title>
</head>
<body>
<table border='0' cellpadding='1' cellspacing='1' bgcolor='#CCCCCC'>
<tr>
<td bgcolor='#EFEFEF'>
<form action='<?=$PHP_SELF?>' method='post'>
Your E-Mail Address:
</td><td bgcolor='#EFEFEF'>
<input type='text' name='from'>
</td></tr>
E-mail address to send to:
</td><td bgcolor='#EFEFEF'>
<input type='text' name='to'>
</td></tr>
<tr><td bgcolor='#EFEFEF'>
Subject:
</td><td bgcolor='#EFEFEF'>
<input type='text' name='subject' value='Check out this site'>
</td></tr>
<tr><td bgcolor='#EFEFEF'>
E-Mail:
</td><td bgcolor='#EFEFEF'>
<textarea cols='20' rows='10' name='content'>Come check out this site at: example.com</textarea><br>
<input type='submit' name='done' value='Send!'>
</form>
</td></tr>
</table>
</body>
</html>


The only thing you will need to change is the layout/colors, and the initial text. :)

Hope this helps,
Jag

dank
09-25-2002, 12:42 PM
You might want to try this free recommend-it script:

http://www.bignosebird.com/carchive/birdcast.shtml

Dan

daclown
09-27-2002, 02:16 AM
You could use paypals system to allow donations without the overhead of merchant accounts / banks etc...

You can even do it transparently with PHP.

Z