How do I make an 'email this page' feature?
| From: | PHP Tech | Date: | Wed, 29 Sep 2004 21:03:07 +0000 |
| Subject: | How do I make an 'email this page' feature? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-198219@lists.php.net to get a copy of this message | ||
Hi.
I am on a tight deadline here- I am trying to get a feature on a website I
am creating where you click a link on a page which says 'email this page'
and it takes you to a new page with a form asking you to enter your name,
email and an email address and name of a person you would like to email the
link of the page together with a message.
In theory this is easy to do- but what would be the best and secure way of
doing it?
I thought by clicking the link this would be a form sending the url of the
page to the next page and so I could then use $_GET to retrieve this. I
also thought of using $_SERVER and getting the referer web address. Then I
could use this in a hidden field and use the mail() function to mail it off.
Aren't both these options open to abuse? I was impressed with a feature I
saw on this website- http://www.chesternovello.com/composer/606/main.html
-
at the bottom of the page when you click on Email this page it takes you to
another page without using a form, and it seems to use just html. How do
they do that? I would really like to use a nice PHP script to do this.
Any ideas? Would be grateful for any thoughts.
I. Gray