View Full Version : query string
05-21-2009, 07:11 PM
Goal: get query string and email the sting upon users submitting form.
Reason: To know what marketing ad unit the user can from
Look for some help. I need to get a query sting from the url (ex. example.htm?id=22e&moreid=99lk) and store the stings as vars and be able to pass these vars from page to page (hidden from the user) and when the user gets to a registration form and submits the form, the vars get attached to the email that is sent to me, so I know where they came from.
05-21-2009, 07:49 PM
You can capture the query string as follows:-
where n is a number representing the first character of the text you wish to capture, that is the one following the ?.
You can the write this out to a cookie, the value of which is added to a hidden field in your form.
In fact few browsers these days accept mailto: as a form action. You need a really old browser for it to work as more modern browsers simply open the email program (if any) and ignore the form. If you are going to use a form for your registration then use a server-side formmail script as the action - there are several good free ones out there.
Haikus are easy
But sometimes they don't make sense.
05-21-2009, 08:08 PM
Yeah, I already have an online form that does a lot of stuff, I was just looking to capture the query string form the initial landing page, and have it carry through the visit and when/if they fill out the form the query string data would attach itself to the form via hidden values and when the form is submitted an email gets sent to me and I then I can see the query string (which was the initial landing page the landed on).
05-21-2009, 09:47 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.