Internet marketing resources, ecommerce web site design tutorials and  just for fun - free cell phone ringtones!
  Taming the Beast - quality web marketing and ecommerce development services
Free Internet marketing resources, web site development tutorials, ecommerce strategies & software solutions.
 Shopping cart reviews & affiliate marketing guides & articles, plus search engine marketing resources & tools. 
Taming the Beast - providers of ecommerce & web marketing services to Adelaide, South Australia & the world!

Tell a friend script update

Posted by Michael Bloch in web development (Wednesday September 20, 2006 )

We’ve just updated both versions of our popular Taming the Beast Tell-A-Friend scripts to v1.3 and v2.1; so if you’re using a copy of either from prior to today, I suggest updating. Upgrading is pretty simple - and of course, both scripts are still free :).

The new versions have improvements to security and may also address some of the random glitches on certain server setups I’ve seen cropping up from time to time.

Like the previous versions, these updated scripts have been kept as simple as possible for easy implementation.

If you’re currently using either of our recommendation scripts, you won’t need to change your input forms if going from v1.2 -> v1.3 or from v2 -> v2.1, just the form processing script component - but remember to personalize the indicated sections in the form processor.

The difference between the two recommendation scripts:

Tell A Friend Script v 1.3 is a very basic form and script which allows your visitors to send a link to your site to up to 3 of their friends. Simple code for a popup window to display the form is also included. You can customize the email their friends will receive and you also receive notifications when the form is used.

Tell A Friend Script v 2.1 does the same as v1.3, but has a feature that includes the URL of the page from where the tell a friend link was clicked in the recommendation email. In the notification you receive, you also see from which page the form was invoked.

If you have any questions regarding the scripts, I’d appreciate you reading the troubleshooting FAQ and if that doesn’t provide a solution; post your queries below, rather than emailing me directly. That way the answers to frequently asked questions can be available for everyone’s benefit :). Please read over other people’s questions and my responses in the thread below before posting - you may find the answer already there.

Need more features?

If you’re looking for a recommendation script with more features, try Tell A Friend King. It allows you to create tell a friend forms quickly and easily with a point and click interface, there’s no complex scripting, incorporates solid spam prevention, tracks and monitors usage, allows for pre-defined messages (text and HTML) or for users to enter their own and much more!

September 2007 - Given this thread has been around for a while, it’s accumulated quite a lengthy number of comments, questions and solutions; so I’ve just deleted many of the comment entries to consolidate everything into a troubleshooting FAQ of sorts - should save you some reading :)

By the way, thanks to everyone for your feedback and positive comments on these free recommendation scripts! It’s really been pleasing to see how broadly they’ve been used over the years!

Troubleshooting

Issue 1 - Should FTP upload mode be type be binary or ASCII?

Solution - ASCII, but most ftp programs should autodetect this anyway.

Issue 2 - When submitting the form the next page just shows the contents of the script.

Solution - this usually means your hosting account doesn’t support PHP

Issue 3 - when submitting the tellafriend form, the resulting page shows an error like this:

>>> Warning: Cannot modify header information - headers already sent by.. etc.

Solution - This usually occurs if you have characters before < ?php at the beginning of the script or after ?> at the end of the form processing script - even spaces can do it at times.

Issue 4 - Form submits correctly, but you don’t receive the test email

Possible solutions

a) There’s extra characters in the script that have been added in by the editor you’re using, but they don’t appear when viewing the script in the editor. Packages like Dreamweaver, FrontPage and Golive are notorious for this. Try using notepad or another plain text editor and you may see extra characters such as Ê at the end of some lines which shouldn’t be there; remove those characters as they will interfere with the operation of the script.

b) Your test emails have been filtered out by your email service provider. Check your bulk folders.

c) On rare occasions I’ve found some hosting services with restrictions in place that prevent mail function from working. It’s worthwhile sending the script to your host and asking them if there’s anything at the server level that would be preventing the emails from being sent.

Issue 5 - You want the popup to show scroll bars, resize etc

Solution - You can change settings in the manually triggered popup by changing values like this:

scrollbars=0 to scrollbars=1

Issue 6 - Version 2.x doesn’t show the referring URL in the recommendation email while you are testing.

Solution:

a) If you’re just going straight to the form while you are testing, there would be no referring URL :). The form needs to be linked to from your site pages in order to capture the referrer information.

b) Version 2.1 of the script requires that the form be saved as .php (not .htm, html etc.) as it has php scripting elements in it in order to capture the URL of the referring page.

Issue 7 - You’d like to add an extra field so users can add their own comments

Solution - The reason why we haven’t added this is that it would be abused by some of the more anti-social visitors who might visit your site. It allows them to send abusive emails to people and cover their tracks. We may create a version 3 in the future with this option though.

By the way, if you decide to add extra fields or customizations yourself that are beyond what the script is currently designed to do; sorry, but I can’t help you with any issues you may experience as a result.

If you’d like to be notified of updates to the Tell a Friend scripts; please subscribe to our free newsletter - subscription box is towards the top of this this page in the left hand menu.


Click here to tell a friend about this article

Subscribe using any feed reader!  
92 comments for Tell a friend script update »
  1. Excellent Email-to-a-Friend script. Simple to use and execute. Thanks.

    This message is for the comment left by stein and anyone who doesn’t want multiple addresses showing up in the To: address field. The Solution: Send all email addresses via the BCC field. Here is the ‘hacked’ code that is working for me:

    @mail(”", $tsubject, $ttext, “FROM: $_POST[email]”, “Bcc: $_POST[friendmail1],$_POST[friendmail2],$_POST[friendmail3]”);

    Thanks again.
    Michael Swartz
    Bay Area Web Design

    Comment by Michael — July 30, 2007 @ 7:03 pm

  2. Thanks for that Michael! :)

    Comment by Michael Bloch — July 31, 2007 @ 4:39 pm

  3. I’m getting the error “Warning: Cannot modify header information - headers already sent by (output started at /home/scottlan/public_html/dogs/tellafriend.php:1) in /home/scottlan/public_html/dogs/tellafriend.php on line 72″
    Even though there are no spaces at the beginning or end of my tellafriend.php file. What else can it be? TIA.

    Comment by Scott — August 6, 2007 @ 9:45 am

  4. Hi?

    I can’t wait to get the script working. But the problem is it’s not sending out the emails. It runs ok from tell a friend to the thank you page but i don’t get any test emails.

    I’ve been trying to follow others in this same problem, on how they found a solution to this, but have not found a forward answer.

    I’m using hostgator as host. Please any solution or advice.

    Thanks.

    Comment by Sibusiso — August 6, 2007 @ 6:52 pm

  5. Scott, what text editor did you use to edit the form processing script?

    Sibusio, some hosts have restrictions in place that prevent mail function from working. I suggest sending the script to your host and asking them if there’s anything at the server level that would be preventing the emails from being sent.

    Comment by Michael Bloch — August 7, 2007 @ 3:32 am

  6. I used WebBuilder 2006 but just to make sure that wasn’t the problem, I also tried saving the file in Notepad. I uploaded it using WS_FTP Pro with the transfer setting set to Auto. In the transfer settings .PHP is set to go as ASCII. I did get the e-mails but wasn’t sent to the thankyou.htm. That’s when I got the error. All files are in one directory and I tried setting all file permissions to 777. No change. What are each of the file permissions supposed to be set as? Thanks for your help!

    Comment by Scott — August 7, 2007 @ 8:58 am

  7. So excited now.

    Ok i had a chat with the support team at hostgator and they helped me with the script. Working fine now.

    I will tell you what they told me to add on the script for anyone else who may be on hostgator or having same problem as mine.

    This is what may or can help.

    Edit the tellafriend.php script like this:

    I changed:
    @mail(”$emailto”, $esubject, $emailtext, “From: $_POST[email]”);

    TO

    @mail(”$emailto”, $esubject, $emailtext, “From: $_POST[email]”, “/usr/sbin/sendmail”);

    Just add that code.

    Hope that helps someone.

    I’m now using my script on http://sports.information-guide.org and will add it on my other blogs as well since its easy to setup.

    Thanks for this script.

    Comment by Sibusiso — August 7, 2007 @ 4:20 pm

  8. Sibusiso, thanks so much for reporting that fix; I’ll add it to the troubleshooting FAQ.

    Scott, can you send me a copy of the script as you currently have it as an attachment to michael at tamingthebeast.net - I’ll take a look.

    Comment by Michael Bloch — August 8, 2007 @ 4:35 am

  9. Thank you Michael. It did turn out to be a strange character in front of the PHP character

    Comment by Scott — August 11, 2007 @ 9:13 am

  10. Glad to hear that fix worked out Scott!

    Comment by Michael Bloch — August 11, 2007 @ 9:59 pm

  11. I suggest to update the script with the return-path because in many servers it could’t work if you are trying to send an e-mail to external pop accounts.
    To prevent this problem, I added this code:

    # This emails the recommendation to the addresses submitted
    $headers = “From: \n”;
    $headers .= “X-Sender: \n”;
    $headers .= “X-Mailer: PHP\n”; // mailer
    $headers .= “Return-Path: \n”; // Return path for errors

    @mail(”$_POST[friendmail1],$_POST[friendmail2],$_POST[friendmail3]”, $tsubject, $ttext, $headers);

    Cheers,
    a.

    Comment by Alian — August 22, 2007 @ 6:54 am

  12. Hello! This looks like it will be a great script for me, and I have it working…almost. We run WIN server 2003. We just turned on PHP services for use with this script. The pop-up comes up, and I can fill out the form, but when I submit, a 404 File Not Found Error comes up. This seems remedial. I have the recommend.htm file, the tellafriend.php file, and the thankyou.htm file all in the same directory. The page that pops the recommend.htm file up is in another directory, but it is finding the file for the pop-up fine. I get the 404 error once I submit the form. The path looks correct when I view path, but it still isn’t seeing the PHP file. Any thoughts?

    Thanks! Chris

    Comment by Chris Szalaj — August 22, 2007 @ 4:33 pm

  13. Alian, thanks for contributing that!

    Comment by Michael Bloch — August 23, 2007 @ 6:20 am

  14. Chris, could you point me to a page on your site with the script implemented so I can take a peek at what’s happening.

    Comment by Michael Bloch — August 23, 2007 @ 6:22 am

  15. http://www.tpac.org/myfairlady

    is the site. The red lips on the right hand side are the link.

    Thanks
    Chris

    Comment by Chris — August 23, 2007 @ 2:38 pm

  16. Hi there Chris,

    I *think* the answer to your problem is here:

    http://bugs.php.net/bug.php?id=23907

    Seems you might need to take some additional steps to allow the php service extension to function under IIS, without those, it will return a file not found error such as you’re seeing.

    Hope this helps!

    Comment by Michael Bloch — August 24, 2007 @ 12:46 am

  17. thanks for an outstaning script! i’ve added it to all pages of my site (http://www.killthecan.org) by adding it to my includes file. the issue that i’m having is that the the correct url is not being passed.

    if i click “recommend this page” from say the about page (http://www.killthecan.org/about/) and then i navigate to another page and click “recommend” again, the url is actually from the about page rather than the page that i’m currently on.

    any thoughts?

    thanks in advance.

    Comment by Greg — August 27, 2007 @ 10:43 am

  18. just an update… if i refresh the popup page with your script on it, the correct url shows up…

    Comment by Greg — August 27, 2007 @ 11:00 am

  19. Hi Michael,

    We keep getting a CGI error that says the CGI script is misbehaving. It says:

    What do you think? CGI Error:
    The specified CGI application misbehaved by not returning a complete set of HTTP headers.”

    Comment by Chris — August 27, 2007 @ 12:16 pm

  20. Hi there,

    I just found that script today and thought it’s great. Unfortunately it doesn’t seem to work properly with as it is just sending me the notification but the actual recommendation doesn’t arrive to its recipient. It doesn’t give any error. My PHP knowledge is very basic, could anyone please have a look on what I am doing wrong?

    http://www.bellacasa-interiordesign.com/tellafriend/recommend.php

    Thanks.

    Comment by Nadine — August 29, 2007 @ 4:02 pm

  21. Greg:

    I wasn’t able to reproduce the problem in IE or Firefox; so I’m assuming you have it sorted? If not, I think you’ll find the issue is your browser caching settings.

    Chris

    this might help:

    http://support.microsoft.com/kb/145661

    Nadine:

    it’s possible it’s being filtered out based on the custom message content. I’ve just tested it, but it could be a little while before it comes through to me (because of our filters). On the assumption that it won’t make it through, please send me a copy of the script as you currently have it as an attachment to michael at tamingthebeast.net. I’ll take a look.

    Comment by Michael Bloch — August 29, 2007 @ 7:32 pm

  22. Hello Michael

    Great site, I was trying to use the tell a friend srcipt but I’m getting a: “Error 404 - Not found
    Your browser can’t find the document corresponding to the URL you typed in.”

    What am i doing wrong.

    Thanks
    Carlos

    Comment by carlos allen — September 4, 2007 @ 10:16 pm

  23. Hi Carlos, can you point me to where you are using the script so I can see what’s happening.

    Comment by Michael Bloch — September 5, 2007 @ 6:11 am

  24. This is the perfect script but I think I am missing something.

    I can go through the process of the page loading fine. I can send the tell a friend page and get the thankyou.htm page, however the email does not show up.

    I have checked for random text. I am also going to forward this to my host, any suggestions?

    http://www.mir-media.com/ff/recform.php

    Comment by Nina — September 5, 2007 @ 10:41 am

  25. the link doesn’t show the URL, also no receive any email.

    I had set both the file 755. And check the code, when I phase it on note pad can’t find any extra strange E. Does it cause the problem??

    Need help

    Comment by faye — September 6, 2007 @ 8:35 pm

  26. Love the script. However, it only seems to work correctly when all three friend emails are filled in. If less than that, I receive the notification, but the friend emails don’t get delivered. Any help?

    Comment by C.J. — September 17, 2007 @ 11:49 pm

  27. Great script — thanks so much. I have a question…my tell a friend script works fine in a GoDaddy environment; but this site is hosted by Dot5 Hosting (www.dot5hosting.com), and for some reason, the thank you page will not load…I get a 404 error. The emails are being set, just can’t get the thank you page to load. Any ideas?

    Comment by Carol — September 18, 2007 @ 5:14 pm

  28. when i paste the pope up code and tell a friend to my site and click once themessage is like this”The requested URL was not found on this server”pl suggest what to do
    on my mail

    Comment by manoj — September 19, 2007 @ 3:22 pm

  29. Wow, sorry everyone - these questions slipped by me. OK, here goes.. I think Faye and Nina I already responded to..

    C.J. - that’s an odd one - can you send a copy of the script as you have it as an attachment to michael at tamingthebeast.net and I’ll have a look.

    Carol - sounds like there’s something wrong with the path configuration; can you point me to where the form is on your site.

    Manoj; I don’t believe you can run add-on php scripts on Blogger.

    Comment by Michael Bloch — September 20, 2007 @ 3:29 am

  30. Hi,

    Form works..great… sends email…great..but Stalls…Doesnt show thank you page… emails are received by all.

    Any Ideas?

    Comment by Keith — September 20, 2007 @ 5:09 pm

  31. Hi Keith,

    I just tried the form on your site and a page of sorts did display - thankyou.html. It had a broken image and a list of links to pages on your site

    Comment by Michael Bloch — September 21, 2007 @ 8:22 am

  32. Thanks Michael,

    I think it was a late night issue..I obviously didnt load the correct page… I will do that now.. thanks for checking for me ..and your site is a great resource!

    Comment by Keith — September 21, 2007 @ 8:58 am

  33. having a bit of trouble with the tell-a-friend script. it does an awesome job on some of my pages, unfortunately with other pages, the refURL isn’t sent. It’s just blank in the emails. I’m thinking this might have something to do with the mod_rewrites i have in place. Is there any way around this? Would it be possible to have the URL passed through a hidden input form? The referal page itself displays the URL just fine, but it’s just not being emailed. The URL is written like “http://www.widgets.com/category/name” (with no trailing slash). Maybe this is causing some sort of problem? I’d love to get this resolved because i LOVE this script. thanks in advance for any help.

    -thomas

    Comment by thomas — September 24, 2007 @ 12:08 am

  34. Hey Thomas, I noticed you also left 5 other comments after this one about various issues you were having with the script. Have you sorted it out? If not, let me know where you’re at and where I can see the script in action.

    Comment by Michael Bloch — September 25, 2007 @ 3:03 am

  35. yeah sorry about that. you can see from the time stamps i was having a pretty rough (and very long) night. lol. but yeah i got it sorted out, the problem with the refurl not displaying in IE was due to the javascript i was using to open the pop-up. i used the same js as i was using for other features on the site, thinking it’d be easier to just use what i was already using. but, it’s working beautifully now that i used the code you supplied :) thanks for checking in with me though, it’s much appreciated!

    Comment by thomas — September 26, 2007 @ 3:37 am

  36. i would however like to hide email addresses from other recipients (the Bcc hack above still isn’t working out too well for me). If you have an update to resolve that issue i’d love to know about it!

    Comment by thomas — September 26, 2007 @ 3:39 am

  37. Glad to hear you sorted out the main issues Thomas. As for the hiding of email addresses (aside from the Bcc modification); I’m really not sure - I’ll probably need to consult someone with much better coding skills than me. I’m a mere hack :). I suspect it would mean making the code quite a bit more complex; so given all the other feature requests, I might have to have a full-blown application developed in the future to cater to everyone’s needs.

    Comment by Michael Bloch — September 26, 2007 @ 7:24 am

  38. I’ve used this script on another website and it works fine there, but I tried adding it to this website today, and when I click to send, it just stays on the pop-up page. Not sure what’s wrong as I copied it directly from the site that I know is functioning properly.

    See here:
    http://jdftransports.com/services.html

    Any help is appreciated!

    Comment by Lauren — September 26, 2007 @ 9:44 pm

  39. Hi Lauren, looks like the form popup page is missing the opening form tag i.e.:

    <form name="tellafriend" action="tellafriend.php" method="post" onsubmit="return checkfields()">

    Comment by Michael Bloch — September 27, 2007 @ 4:39 am

  40. Thanks Michael, don’t know how I missed that. You’re the best!

    Comment by Lauren — September 27, 2007 @ 6:43 pm

  41. Hello, I just tried the Advanced Tell A Friend Script and it works except for the thank you page. The thank you page doesn’t load after the form is submitted. It seems that the tellafriend.php script page loads instead. Any ideas how to resolve this?

    Comment by Mark — October 2, 2007 @ 11:19 pm

  42. Hi Michael,
    I just can’t figure out what I did wrong here. Everything seems to be working fine, except I just don’t get the emails and notification email. I am new to php, maybe that’s my problem. Thanks ahead…here’s the form page:

    http://www.american-originals.com/recform.php

    Comment by Gi — October 2, 2007 @ 11:32 pm

  43. Hi Mark, something odd is definitely going on there. Send me your tellafriend.php file as you currently have it to michael at tamingthebeast.net and I’ll take a look.

    Comment by Michael Bloch — October 3, 2007 @ 6:25 am

  44. Gi, the test I ran had the same result; no email - please send me a copy of the tellafriend.php script as you currently have it as an attachment to michael at tamingthebeast.net and I’ll take a look at it.

    Comment by Michael Bloch — October 3, 2007 @ 6:36 am

  45. I am working on a site for a friend. I can not get it to work at all on his site, prob because his server will not run it so I am going to get him to switch. Anyhow, I put a test page up on my site and it keeps giving me this error…

    Parse error: parse error, unexpected T_VARIABLE in /home/****/public_html/tellafriend.php on line 46

    You can see a test page here:
    http://www.vintagecityclothing.com/testing.html

    What do I need to do?

    Comment by Crystal — October 7, 2007 @ 2:38 pm

  46. how come the email comes with this instead of the address of my site? where do i edit that..

    thanks

    Comment by julian — October 13, 2007 @ 1:28 pm

  47. Hi, I have a problem. Everything works great but ONLY when I fill up all 3 friend’s email ids. When I submit the form with 1 or 2 friend’s email ids, then it doesn’t work. But there’s no error as such. What / Where could be the problem? Please help me out. Thank you.

    Comment by Lax — October 15, 2007 @ 8:20 pm

  48. Hi Guys,
    Still my RAF not working please give me the correct script.
    I get Thank you page,but Iam not getting mails

    Thanks
    sunil

    Comment by sunil — October 16, 2007 @ 4:07 am

  49. Sunil, I notice that your site is running on a Windows server that has php enabled. I’ve checked what I can from my end (without seeing your script’s content) and everything appears to be ok - is it possible that your host hasn’t enabled or has restrictions on PHP’s “mail()” function? Might be worthwhile asking them.

    Comment by Michael Bloch — October 16, 2007 @ 5:09 am

  50. Lax, please post a URL to your form and I’ll take a look

    Comment by Michael Bloch — October 16, 2007 @ 5:11 am

  51. Michael - great script. I’m experiencing the same problem as a few others - the recommended emails only go out to the friends if all 3 fields are completed. Is this something to do with the second @email function looking for values (email addresses) that don’t exist, therefore the entire email fails? We may need two layers of “ifs” to allow for one or two values not being received from the referrer form.

    Comment by John — October 17, 2007 @ 4:44 am

  52. Hi - may have answered my own question. It adds a function to see if fmail2 ans fmail3 are empty, then sends out the emails accordingly. It’s probably not the prettiest PHP you’ll see, but it seems works for me anyway.

    # This sends the note to the addresses submitted
    function check_not_empty($s, $include_whitespace = false)
    {
    if ($include_whitespace) {
    // make it so strings containing white space are treated as empty too
    $s = trim($s);
    }
    return (isset($s) && strlen($s)); // var is set and not an empty string ”
    }

    if (check_not_empty($_POST[’fmail1′],1) && check_not_empty($_POST[’fmail2′],1) && check_not_empty($_POST[’fmail3′],1)) {
    @mail(”$_POST[fmail1],$_POST[fmail2],$_POST[fmail3]”, $tsubject, $ttext, “FROM: $_POST[email]”);

    } elseif (check_not_empty($_POST[’fmail2′],1)) {
    @mail(”$_POST[fmail1],$_POST[fmail2]”, $tsubject, $ttext, “FROM: $_POST[email]”);

    } elseif (check_not_empty($_POST[’fmail3′],1)) {
    @mail(”$_POST[fmail1],$_POST[fmail3]”, $tsubject, $ttext, “FROM: $_POST[email]”);

    } else {
    @mail(”$_POST[fmail1]”, $tsubject, $ttext, “FROM: $_POST[email]”);
    }
    # After submission, the thank you page
    header(”Location: $thankyoupage”);
    exit;
    }

    Comment by John — October 17, 2007 @ 9:44 am

  53. Hi John, thanks for posting that workaround - I’m really not sure why it does that on some setups and not on others. I’ll need to consult with some uber-geeks about it; but I’m sure your efforts will be appreciated by others experiencing the issue until I can do so :).

    Comment by Michael Bloch — October 18, 2007 @ 5:51 am

  54. Hi,

    my Tellafriend message is supposed to be sent in Slovak language. But then a problem occurs, the message comes in with some chars that cannot be read, as they are replaced for some weird stuff. The problem characters are e.g. ť or ž. Is there any way how to cope with the char set???

    Thany for help.

    Comment by Mickey — October 21, 2007 @ 11:59 am

  55. Step 1 - The Tell a Friend script
    Copy and paste the code below (from ) into Notepad and then save as “tellafriend.php”. The only items you really need to change are the “$emailto” information and also your site URL. Both of these are in bold below.

    not sure what you mean by into noteapd and save as php? how do i save as php in notepad?
    thanks

    Comment by John — October 25, 2007 @ 9:54 pm

  56. It works…sort of. Yahoo! places this restictions on php mail–you must specify a return address that is in your own domain. Since that is the case, can I still use this script? Thanks in advance.

    Comment by Andy — October 30, 2007 @ 9:45 am

  57. Hey Michael,

    I am getting the following error code when submitting the form:

    Parse error: syntax error, unexpected T_VARIABLE in /home/mmancini/rebuttalstickers-www/recommend/tellafriend.php on line 27

    (Similar to question #45 in this thread - but I didn’t see an answer to question #45)

    I looked around on line 27, but not sure what the problem is.

    Am I an idtiot, and either way, can you help?

    Thanks!

    Comment by Stephen — October 30, 2007 @ 11:38 am

  58. Hi,

    I’m using script v2.1. Great script, easy to install and work with. I have one problem though, the e-mail that I get has blank URL i.e. all of the text come through but URL.

    I read the posts here to figure out what I’m doing wrong. Any help will be much appreciated.

    Thanks

    Comment by Archie — November 1, 2007 @ 6:23 pm

  59. Hello, Your code is excellent. Thank-you.

    I am noticing that some of the emails that people are sending to are bouncing due to incorrect addresses.

    I am receiving the bounce message, but wish that the sender was instead. Is there a way to make it so that if an email bounces, the sender receives the error message, and not me?

    -Thanks, Stephanie

    Comment by Stephanie — November 7, 2007 @ 5:29 pm

  60. I downloaded the script and all is well from my side, but the email is never received from the person sending the Tell A Friend message. Please advise. Thank you.

    Comment by David — November 8, 2007 @ 2:50 pm

  61. I’ve been receiving a large number of spam emails through the recommendation form submission. Does anyone else experience this? Is there a way to block them so only true emails come through?

    Any help is appreciated!

    Comment by Lauren — November 11, 2007 @ 2:01 pm

  62. I’m having the same problem as Andy. I have a Yahoo hosted site and everything works fine except the e-mails are never sent. I checked my .tmp directory and there is a mailError.log that says “From address not in member domain. Message not sent.” Any ideas? Thanks.

    Comment by Adam — November 16, 2007 @ 5:19 am

  63. Hi

    I’ve applied the “BCC” hack (item 1) but when tested I get a Mail Failure message
    ================================
    “A message that you sent contained a recipient address that was incorrectly
    constructed:

    Bcc: missing or malformed local part (expected word or “

    Comment by Colin — November 21, 2007 @ 5:22 am

  64. I have tested script and everything works find. However i;m afraid of abusing script because i do not see any really effective method to prevent spamming.
    I would appreciate if further upgrade integrate captcha, sending max 2-3 forms per ip address and also sending of ip address to owner of website (if same ip address abuse form then it is easy to block it)
    Tell a friend script call for abusing and spamming. Every extra integrated security is appreciate.

    Comment by Deny — November 25, 2007 @ 2:35 pm

  65. PHP is creating a strange error.

    Parse error: syntax error, unexpected ‘.’ in /usr/www/users/alexb/pghbizcal/tellafriend.php on line 76

    For those who are counting:-) line 76 is

    # This sends the note to the addresses submitted

    in the original script. Not a “.” in sight.

    The process starts at:
    http://businesscalendar.org/testlink.htm

    Ideas are welcome..

    Comment by Alex — November 26, 2007 @ 8:39 pm

  66. John from #52…I think that I am having the same problem but where did you insert that code fix…under, over or instead of what the orginal was? Thanks so much!
    Nicole
    PS - website is totally under construction for someone…just trying to get this working.

    Comment by Nicole — November 26, 2007 @ 10:00 pm

  67. I am having the same issue as CJ any advise?

    I am using it a bit differently possibly, only edit to the code i made was i changed the code to reflect this

    i use the script in a greybox and the url detection didn’t work in the process of using it.

    also i have a quick question on the BCC hack… when i use it no1 gets the emails when i disable it i have to put all 3 emails in to get the emails sent out, tried 1 2 and 3 emails with the BCC hack and nothing. please advise

    Comment by Ken — November 28, 2007 @ 2:06 am

  68. Hi , I,m using the Tell-A-Friend script V 2.1 but it only seems to work with Firefox browser and not Internet Explorer?
    Could anyone shed any light on this problem please?

    Comment by paul — November 28, 2007 @ 10:36 am

  69. Michael,

    Thanks for the free script - it would be even more awesome if I could get it to work! :)

    I’m experiencing the same issue as #57, getting this error when submitting the form on a test page:

    PHP Parse error: parse error in E:\web\popdesigngroup\mcd\cashless\tellafriend.php on line 27

    I’m sure there is a simple explanation, but I can’t figure out why it isn’t working.

    Thanks for your help.

    Comment by Jen — November 30, 2007 @ 3:20 pm

  70. great little nifty script. I got it working within 15 minutes. Everything is running smoothly except some issues with accentuated characters in the messages received in Outlook. All é chars are interpreted as é . I changed the form page charset back and forth from utf-8 to iso-8859-1 but with no results.
    All the other pages in the website are using iso-8859-1 as default charset and working fine.
    I tried using é instead of é in the messages texts but that didn’t work either.
    Any hints on how to solve this?

    Kind regards
    FireWolf

    Comment by FireWolf — December 2, 2007 @ 9:57 pm

  71. Hi, your script works fine on Firefox, but I.E.6 and 7 don´t shows the recommended URL.

    Can you say me whats wrong?

    Comment by Olaf — December 4, 2007 @ 11:21 am

  72. Problem fixed - it was the JS code…

    Many THX - Great Script

    Comment by Olaf — December 4, 2007 @ 1:00 pm

  73. Hello, thank you for providing this great script. Can you please tell me how to change the submit button to a graphic. I tried changing it but the script would stop validating and then it would render the thank you page.

    Much appreciated!
    Warm regards,

    Comment by Martha — December 6, 2007 @ 2:49 am

  74. Dear Michael,

    Thank you for a great script and great support to those of us who are having problems.

    My problem is the same as Sunil #48
    The script is running nicely and returning my thank you page. But no mails go out to either me or the friends. Has anyone solved this problem? My server provider is scratching his head not understanding what can be wrong. I have saved the php in notepad (published it through sharepoint-the new name of frontpage)but I can’t see any hidden characters.
    The starting page is http://www.jensenconsulting.no/tips_test.htm

    Help!

    Comment by Camilla — December 6, 2007 @ 5:40 am

  75. any ideas chief? i really really like the script just can’t figure out having to have all 3 filled in.

    Comment by Ken — December 6, 2007 @ 9:15 pm

  76. Hello,
    Great script. I just have a small problem. Everything seems to work but the thank you page is displayed in the pop-up. Is there a way to get the pop-up to close when submitted and then the underlying page go to the thankyou.htm?
    If that is too hard, how about just shutting the pop-up after the form is submitted?
    The site is http://www.innerbalancehealthcenter.com
    The link is towards the top.

    Comment by David — December 8, 2007 @ 11:46 pm

  77. I did a quick workaround and modified my thank you page to automatically close by adding:

    Crude but this works.

    Comment by David — December 8, 2007 @ 11:59 pm

  78. hi,
    i am a student and have started working on php as a hobby.please forgive me if my question sounds stupid but it would be a graet help if you could help me out.your tell a friend php is great. i dont use any professional web host i just tested it on my own computer.I have a Apache development server running on my computer with php 5.the thank you page is shown when i click submit but i do not get any emails.is there any other software i should add to get a tell a friend to work.please hep me out.

    Comment by amy — December 9, 2007 @ 2:20 am

  79. hi sorry for the second post but i forgot to add that i am running the apache and php on windows vista .

    Comment by amy — December 9, 2007 @ 2:25 am

  80. Youch, quite a few questions have piled up - sorry that I haven’t been helping out recently folks, things have been really hectic. OK, if you’re still having problems and want some assistance; just add to this thread the the response number of your original report. Please check the troubleshooting guide first before doing so as the answer to your problem may be in there :).

    Comment by Michael Bloch — December 11, 2007 @ 5:18 pm

  81. My original question was #74. However it turned out to be the server settings after all. The mails are sendt and recieved now

    However. I am now trying to use the advanced script and the url is not being refered. The recomandation mail actually reads:

    …thought you may be interested in this web page.

    Is there something wrong with the javascript?

    The link is found at:

    http://www.jensenconsulting.no/tips_test.htm

    Recommend this page;

    help appreciated

    Comment by Camilla — December 12, 2007 @ 8:18 am

  82. Hi Michael
    Don’t know if you could help me. Love the script idea, but for some reason I can only get one of the emails to be sent - I get the email listing who has recommended a page, and what page they recommended, but I can’t seem to get it to fire the emails to the friend. I have downloaded the v2.1. I wondered if it was to do with blacklisting, but my IP is clean. Can you help?
    The link to the script is:
    http://www.mindfocusforgolf.com/freepsrecourse/recform.php

    I’m not technical, but have only (as far as I recall) changed the email address as requested.

    Best wishes,
    Simon.

    Comment by Simon — December 12, 2007 @ 11:16 am

  83. Hey i just started to use your code. I can get the email function to work correctly but it will not show me the thank you page. I am getting this:
    ————————————-
    error
    Warning: Cannot modify header information - headers already sent by (output started at /home/wgdwxoi/public_html/conferenceiq/tellafriend.php:7) in /home/wgdwxoi/public_html/conferenceiq/tellafriend.php on line 134

    Is there a way that you can help me out with this?

    Thanks Eric

    Comment by Eric — December 13, 2007 @ 12:28 pm

  84. I like the script. Made all the substitutions as directed in the instructions. pop-up form comes up okay, but after I hit the “send” button I get a window which reads:

    PAGE NOT FOUND

    The page you tried to access does not exist on this server. This page may not exist due to the following reasons:

    1. You are the owner of this web site and you have not uploaded (or incorrectly uploaded) your web site. For information on uploading your web site using FTP client software or web design software, click here for FTP Upload Information.

    2. The URL that you have entered in your browser is incorrect. Please re-enter the URL and try again.

    3. The Link that you clicked on incorrectly points to this page. Please contact the owner of this web site to inform them of this situation.

    Went back to make sure I installed everything as per the directions and still no go. Help!

    Comment by eric — December 14, 2007 @ 12:48 am

  85. I’m still working on this but I’m getting this error:

    The server encountered an unexpected condition which prevented it from fulfilling the request.
    The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log.

    Comment by alak — December 15, 2007 @ 6:20 pm

  86. Camilla - not sure on this - I can see the http_referer and print refurl coding in the source, which I shouldn’t be able to. It’s as though PHP isn’t working; although it must be if the message goes through, which it does. You mentioned server settings being an issue before - what was the issue?

    Ken, I haven’t played with the Bcc hack as yet, so I’m not sure.

    Amy, might be an issue with your php mail() function: http://au.php.net/mail

    Simon, I just tried out your script and received the three emails without a problem

    Eric (no.1), the “cannot modify header” error usually occurs if you have characters before < ?php at the beginning of the script or after ?> at the end of the form processing script - even spaces can do it at times.

    Eric (no.2), Please post a link to where your form is

    Alak, sounds like a permissions issue - what are the permission on the form processing script at present?

    Comment by Michael Bloch — December 19, 2007 @ 4:59 am

  87. Hi Michael,

    The issue with the serversettings before was that he had to choose which smpt server the mail was to be sendt from. The simple script works and as you say the advanced script also sends the mail, only lacking the url. Thats why I thought it might be the javascript, but I really have no idea…

    Comment by camilla — December 19, 2007 @ 6:27 am

  88. Hi…sorry I need a little help because I’m a complete novice! I copied the 2 parts of the script and saved in BBedit. I’m not quite understanding where these scripts should be placed….in a separate directory or in the directory of the page I want to use it on? Does the tellafriend.php code get copied into the head of the page you want to use it on or is just a script that sits in a directory and gets linked to? Oh, boy, I’m lost! I get where to link to the recform on a page with the pop up code…but the tellafriend.php…not sure where this comes in. Please help! THANKS!!!

    Comment by Alyssa — December 20, 2007 @ 5:15 pm

  89. Hi Michael,

    I answered my own lame question (#87) abd I’m able to get a pop-up rec form and fill out the form, but then I get an error message (same for some others posting on this thread) on submit:

    Parse error: parse error, unexpected T_VARIABLE in /home/socsnail/public_html/wla/includes/tellafriend.php on line 47

    I didn’t see an answer anywhere…do you know what the problem is?
    Thanks!

    Comment by Alyssa — December 23, 2007 @ 2:33 am

  90. Alyssa, that usually you have some characters in the coding that shouldn’t be there. Which text editor did you use to configure the script?

    Camilla, I probably couldn’t help you much more on this without accessing your server to take a look and see what’s going one.

    Comment by Michael Bloch — December 23, 2007 @ 4:45 am

  91. Hi Michael…I figured it out..I had a quote facing the wrong way. I think it’s all working now, thanks! If I run into any more problems I’ll check back here. This has been such a helpful resource! ;)

    Comment by Alyssa — December 23, 2007 @ 7:15 pm

  92. Great to hear Alyssa :)

    Comment by Michael Bloch — December 24, 2007 @ 12:49 am

Leave a comment (moderated)

(required)

(not published)

RSS feed for comments on this post. TrackBack URI