"Invite a friend"

liquidagoracom's Avatar, Join Date: Oct 2007
Newbie Member
I need to put a form in my website www.liquidagora.com where people can enter a friend's email and automatically the site sends an email to that person.


I don't even know how is that called, So I couldn't search here on the forum.

I'd appreciate any resource with a code to do that.



Thank you very much

Luiz
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
What server side language you are using. Its not possible to do that using Plain HTML
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
A simple solution to the problem would be to put a mailto: link in your page, using a bit of javascript!

Code: HTML
<script language='JavaScript'>
function doEmail()
{
    var email = document.getElementById('email').value;
    var uri = 'mailto:'+email+'?Subject=Check this out&Body=Check out http://go4expert.com';
    document.getElementById('ifr').innerHTML = '<iframe src="'+uri+'"></iframe>';
}
</script>
<input type="text" name="email" id="email"> <input type="button" value="Send To Friend" onClick="doEmail();">
<span id='ifr' style='display:none'></span>
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
For a mailto link you can do without js as well.