tags:

views:

54

answers:

2

I was looking on how to create a recommend this page form that sends the given pages URL address and where the user can enter their email address and a message however long and a single email address or multiple addresses where the user wants to send the recommend this page to.

I was wondering if anyone knew what code I could use. I am currently using PHP as my server side language.

I wanna know how to code my own form?

A: 

That's a pretty broad question but essentially to do this with PHP, you will need to be familiar with 3 things:

$_POST array in PHP - holds all form values on the page posted back to the server

mail() PHP function

CAPTCHA implementation for verifying real users

Updated for Frank's spammer comment.

jaywon
How would this code look like?
email
+1  A: 

http://www.addthis.com/ offers a free service we've used with clients a couple of times

Devin Ceartas
I've found them quite unreliable at times, but it's a good start, and really easy to plug in. Also, any "email this" script inevitably becomes a target for spammers; better to have AddThis's mail servers deal with spammers than your own....
Frank Farmer