Ok, I have been searching everywhere (including the search feature here) to figure out this very simple task.
When people click a link, I want it to open up their email client with their email address in the From spot. I want the message body to be the url that the link was clicked.
EDIT: The part I can't figure out is how to make it detect the url the link was clicked from.
In the end it should be something that can be placed in a sever side include. This is why I am trying to get it to detect what url it was clicked from. I found the script once, but can't remember where.
Filling in the email FROM & Body on click
Moderator: General Moderators
-
AbrasiveRock
- Forum Commoner
- Posts: 40
- Joined: Sat Feb 08, 2003 10:47 pm
- Location: Olympia,WA
- Contact:
Filling in the email FROM & Body on click
Last edited by AbrasiveRock on Sat Aug 07, 2004 2:43 pm, edited 1 time in total.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
<a href="mailto:whatever@yoursite.com?subject=urlencoded_subject&message=urlencoded_message">click me!</a>-
AbrasiveRock
- Forum Commoner
- Posts: 40
- Joined: Sat Feb 08, 2003 10:47 pm
- Location: Olympia,WA
- Contact:
Ok, what I have so far is...
So I have everything except making the body list the URL is was clicked from.
Code: Select all
<A HREF="mailto:?subject=Check this website out!&body=This_Is_The_Part_That_I_Want_To_Detect_The_URL_The_Link_Was_Clicked_From">Send This Page To A Friend</A><P>- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
<?php
echo '<a href="mailto:?subject=' . urlencode($subject) . '&body=' . urlencode($_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . $_SERVER['REQUEST_STRING']) . '">Send this page to a friend</a>';
?>