If the tell a friend link is on the page you want to send in the email then
use #CGI.HTTP_REFERER# in the hidden input field.
Sebastian
on 1/31/01 9:09 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote:
>
> --part1_6b.f450db3.27aa2d86_boundary
> Content-Type: text/plain; charset="US-ASCII"
> Content-Transfer-Encoding: 7bit
>
> Hi All,
> I'm new to CF can you please take a look at my code and tell me what's wrong
> with it. Or if you know of a tutorial for this script?
>
> tell.cfm
>
> <form action="mailpage.cfm" method="post">
> <cfoutput>
> <input type="hidden" value="http://#HTTP_HOST##PATH_INFO#" name="pageToVisit">
> </cfoutput>
> TELL A FRIEND ABOUT THIS SITE!<br>
> Enter the email address of a friend here:<Br>
> <input type="text" name="friend_email" maxlength="90"><br>
> Enter Your name here, so your friend knows its you:<br>
> <input type="text" name="yourName" maxlength="90"><br>
> <input type="submit" value="Tell my friend now!">
> </form>
>
> ========================
>
> mailpage.cfm
>
> <cfif #form.friend_email# IS NOT "">
>
> <cfoutput>
> Success!
> </cfoutput>
>
> <cfmail to="#form.friend_email#" from="#form.yourname#" subject="Cool website
> I found" type="HTML">
>
> Hey man, its #form.yourName#.
> I thought you might want to check out this site I found...here's the link:
> <a href="#form.pageToVisit#">#form.pageToVisit#</a>
> They have cool info on building a good website.
> </cfmail>
> <cfelse>
> You didn't give us an email address to send to!<br>
> Please go back and try again.
> </cfif>
>
>
> Thanks
> Mike
>
>
> --part1_6b.f450db3.27aa2d86_boundary
> Content-Type: text/html; charset="US-ASCII"
> Content-Transfer-Encoding: 7bit
>
> <HTML><FONT FACE=arial,helvetica><FONT SIZE=2>Hi All,
> <BR>I'm new to CF can you please take a look at my code and tell me what's
> wrong
> <BR>with it. Or if you know of a tutorial for this script?
> <BR>
> <BR>tell.cfm
> <BR>
> <BR><form action="mailpage.cfm" method="post">
> <BR><cfoutput>
> <BR><input type="hidden" value="http://#HTTP_HOST##PATH_INFO#"
> name="pageToVisit">
> <BR></cfoutput>
> <BR>TELL A FRIEND ABOUT THIS SITE!<br>
> <BR>Enter the email address of a friend here:<Br>
> <BR><input type="text" name="friend_email" maxlength="90"><br>
> <BR>Enter Your name here, so your friend knows its you:<br>
> <BR><input type="text" name="yourName" maxlength="90"><br>
> <BR><input type="submit" value="Tell my friend now!">
> <BR></form>
> <BR>
> <BR>========================
> <BR>
> <BR>mailpage.cfm
> <BR>
> <BR><cfif #form.friend_email# IS NOT "">
> <BR>
> <BR><cfoutput>
> <BR>Success!
> <BR></cfoutput>
> <BR>
> <BR><cfmail to="#form.friend_email#" from="#form.yourname#" subject="Cool
> website
> <BR>I found" type="HTML">
> <BR>
> <BR>Hey man, its #form.yourName#.
> <BR>I thought you might want to check out this site I found...here's the link:
> <BR><a href="#form.pageToVisit#">#form.pageToVisit#</a>
> <BR>They have cool info on building a good website.
> <BR></cfmail>
> <BR><cfelse>
> <BR>You didn't give us an email address to send to!<br>
> <BR>Please go back and try again.
> <BR></cfif>
> <BR>
> <BR>
> <BR>Thanks
> <BR>Mike
> <BR></FONT></HTML>
>
> --part1_6b.f450db3.27aa2d86_boundary--
>
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists