Back to myContactForm.com - Easy email form creation and processing for your web site
myContactForm.com - Help Forum Forum Index myContactForm.com - Help Forum
Have a question that you need answered about myContactForm.com? Post it on this message board but first search this forum and read out FAQ to ensure it has not already been answered. This is not a board to post links to your site! SPAM will be deleted!
 
   Search MessagesSearch Messages
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pulling URL from previous page

 
Post new topic   Reply to topic    myContactForm.com - Help Forum Forum Index -> Form Management
View previous topic :: View next topic  
Author Message
thegreatoutdoorsrv



Joined: 20 Jan 2007
Posts: 1

PostPosted: Tue Mar 08, 2011 10:04 am    Post subject: Pulling URL from previous page Reply with quote

I have one product per page. The user clicks "Contact Us" if they are interested, which directs them to our form. They assume I know which product they are interested in sometimes. Is there a way to know which URL they came from last?
Back to top
View user's profile
mycontac
Site Admin


Joined: 31 Dec 2003
Posts: 2739

PostPosted: Wed Mar 09, 2011 9:14 am    Post subject: Reply Reply with quote

Unfortunately, this is not possible without some server side scripting or javascript. If your server is capable of doing PHP you could enter a 'value' parameter into the text box asking which product they are interested in that would automatically post the previous URL to it. The code would look something like this:

Your existing text box should be similar to:
Code:
<input name="q[1]" type="text" value="" size="20" maxlength="150" />


The PHP code you'll add to a 'value parameter':
Code:
value="<?php echo "$_SERVER['HTTP_REFERER']"; ?>"


Put together, it would look something like this:
Code:
<input name="q[1]" type="text" value="" size="20" maxlength="150" value="<?php echo "$_SERVER['HTTP_REFERER']"; ?>" />


This should do the trick if your server is capable or doing PHP.

Nick Ladd
myContactForm.com
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    myContactForm.com - Help Forum Forum Index -> Form Management All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB 2.0.11 © 2001, 2002 phpBB Group