Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialryanforrest
3,060 PointsPHP 'Tell a friend' form
Hi guys,
I'm looking to include a simple PHP form on a site to invite visitors to 'tell a friend'/'recommend to a friend'.
I envisage that the form will require two email addresses - one for the person sending the recommendation and one for the recipient, and either an editable field for a message (or a pre-populated message - something like, 'Mike the Frog thinks you might be interested in...', for example).
I've found a few tutorials on line which look like they might fit the bill, but I wondered whether this is something any Treehouse folks have had a go at themselves or could recommend good, user-friendly examples of in the wild.
Another question I wanted ask is whether you think this is a good idea? I'm keen to avoid any risk of abuse from spammers so any thoughts on security or how a facility like this might be misused would be interesting. As web users would you use these kind of features on sites (to recommend, say, a cafe or book shop you really loved)?
Any thoughts gratefully received, either regarding the technicalities or user experience aspects of such a tool.
Thanks for your time - it's appreciated!
Ryan
2 Answers
Randy Hoyt
Treehouse Guest TeacherOverall, I wouldn't think this little-used feature would be worth exposing your server to spam.
(1) Use: You are probably familiar with all the social media sharing links on the internet. Even with those in place, 82% of web sharing is still done with copy and paste. People already know how to share content they find with others, and they're more likely to use the methods they already know.
(2) Spam: I built a site with this exact feature a few years ago, and we had to shut it off because of spammer abuse. (I seem to remember that we had less than 10 legitimate people share with it.) Spammers are looking for any way to send bulk email using someone else's server. They can easily write a computer program that uses your form to send spam to millions of email addresses.
ryanforrest
3,060 PointsThanks Randy, I appreciate your response. I'm thinking of suggesting an alternative to the client.
As you say, I think the risks outweigh potential benefits, in addition to which the client already has a strong social media presence which we can tap into.
Thanks again and best wishes,
Ryan