View previous topic :: View next topic |
Author |
Message |
thegreatoutdoorsrv
Joined: 20 Jan 2007 Posts: 1
|
Posted: Tue Mar 08, 2011 10:04 am Post subject: Pulling URL from previous page |
|
|
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 |
|
 |
mycontac Site Admin
Joined: 31 Dec 2003 Posts: 2860
|
Posted: Wed Mar 09, 2011 9:14 am Post subject: Reply |
|
|
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 |
|
 |
|