Post new topic Reply to topic  [ 3 posts ] 
 Post subject: How can I insert a variable to the script into the message
PostPosted: 2010-02-08 (02:55) 

Joined: 2010-02-08 (02:43)
Posts: 2
Hi There!

Great Formmail script.

I would like to use your script to insert a variable into the body or subject of the message that the end user is sending.

For example: http://www.mysite.com/contact/?=abc123 would be a link at the bottom of every page on our website.

Where abc123 can be either the name of the page from which the link to the contact page is clicked. Or, text of my own choosing.

The end result would be to automatically insert "Please tell me more about (what's on the page the user is on)" into the subject or body of the message the end user is sending.

Thank you in advance for your swift reply,

Sandsurfer


Top
 Profile  
 
 Post subject: Re: How can I insert a variable to the script into the message
PostPosted: 2010-02-08 (10:39) 
Site Admin

Joined: 2003-07-27 (00:49)
Posts: 7351
Step 1 - index.php

$add_text = array('title' => isset($_GET['title']) ? $_GET['title'] : '');

Step 2 - mail.tpl.txt

{title}

Step 3 - Link to the script like so

http://www.example.com/tellafriend/?title=abc123

Ralf


Top
 Profile  
 
 Post subject: Re: How can I insert a variable to the script into the message
PostPosted: 2010-02-09 (05:22) 

Joined: 2010-02-08 (02:43)
Posts: 2
Ralf, You simply Rock!

Thanks for your help.

Sandsurfer


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Resources:   Schwerin    Private Krankenversicherung    Krankenversicherung    Website Tools Collection    Speed Camera Database    Radarfallen-Datenbank    Speed Camera Database    Teeny Weeny URL
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Translated by Xaphos © 2007, 2008, 2009 phpBB.fr