send email to a friend script

liunx

Guest
does anyone know how I can put a form on my webpage that sends my website link to their whoevers email address they want. Like a send email to your friend link. and when they click on the link a form pops up and you can enter in your friens name and email address and then click on submit and an email gets sent to their friends saying goto my website! Does all of this require just javascript or is it more to it than that? I dont know any PHP. Maybe someone has a link I could goto the explains how to do all this!<!--content-->Originally posted by chriscam19 <br />
does anyone know how I can put a form on my webpage that sends my website link to their whoevers email address they want. Like a send email to your friend link. and when they click on the link a form pops up and you can enter in your friens name and email address and then click on submit and an email gets sent to their friends saying goto my website! Does all of this require just javascript or is it more to it than that? This is all you need. You can edit the text in bold.<br />
<br />
<IMG src=http://www.webdeveloper.com/forum/archive/index.php/"email-this.gif" width="18" height="10" alt="Send This To A Friend" border="0" hspace="0" vspace="0"> <A href="mailto:?Subject=You will like this!&Body=I thought you might find this URL interesting: <!-- m --><a class="postlink" href="http://www.the-page-address-goes-here.com/">http://www.the-page-address-goes-here.com/</a><!-- m -->" class="index" onMouseover="window.status='RECOMMEND this page to your friends'; return true;" onMouseout="window.status=''; return true" title="Recommend the URL for this page here to your friends. It is as easier than sending an e-mail">Email This URL</A><!--content-->You can do it much easier, however, if you do use PHP. You can get the referring URL, so you only need to include a link, rather than custom code for each page. If you are interested, I can get you some code...<!--content-->code you send me some code please. I do not know where to begin and I dont know PHP<!--content-->Ok, just make sure for me that your server supports PHP. Make a page called test.php and add this code to it:<br />
<br />
<?PHP<br />
echo ("I have PHP!");<br />
?><br />
<br />
Let me know what that spits out...<!--content-->i opened notepad, copied this into it:<br />
<br />
PHP:<br />
<?PHP<br />
<br />
echo ("I have PHP!");<br />
<br />
?><br />
<br />
then uploaded it to my server. My server supports php.<!--content-->Ok, here is the code that you need. You link to the page form.php on the pages that you would like to allow users to be able to send.<!--content-->ok let me try<!--content-->thanks!!!!! thanks alot!!! YOU ARE THE MAN!!!!!!!!<br />
<br />
<br />
CHRIS<!--content-->Glad to hear it is working for you...<br />
<br />
Cheers!<!--content-->Infinity I used your script and it worked fine. But then i had to changed web servers. now for some reason it doesnt seem to be working right. can you goto ... click on enter, and then go down where it says refer us to a friend and try out the script yourself. you will see what I am talking about!<!--content-->I am using the zip file you provieded for me. Remember the refer.php and form.php but it still does not work correctly. I dont have a cgi-bin in my new directory I have a cgi-local though.<!--content-->Hi -- I tried everything you said and this is what happened when I put the code on my site -- what am I doing wrong?<br />
<br />
<!-- m --><a class="postlink" href="http://www.shefinds.com/anuncio.html">http://www.shefinds.com/anuncio.html</a><!-- m --><!--content-->Script is working for me...<br />
<br />
Did you modify anything in ether form.php or refer.php scripts? <br />
If you did, could you post your version here, or, better yet, in PHP forum?<!--content-->First, thank you for making this script available, it works wonderful except that I cannot get the $HTTP REFERRER working correctly :( . Could this be due to the fact that I have ZONE ALARM? If so, I'm sure it works for other people but how can I make a redirect page for people who don't have a REFERRER so that it will let them know to disable their software or whatever the problem may be?<br />
<br />
Thanks again :)<!--content-->That script was written quite a while ago... Many servers now have register-globals set to off. Try $_SERVER['HTTP_REFERER'];<!--content-->:eek: Ooops :) Well thank you for your help. I tried that and I got:<br />
"Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING" <br />
I'm learning php but not good :) I know I did something wrong but I don't know what :( <br />
<br />
Should the code on the form.php look like this:<br />
<?php $fullurl = "$_SERVER['HTTP_REFERER']"; <br />
?<!--content-->Remove the double quotes...<!--content-->
 
Back
Top