Page 1 of 1

Formbuilder and $_SERVER["HTTP_REFERER"]

Posted: Mon May 31, 2010 9:26 pm
by tobre
Here's what I am trying to achieve:

I would want to use formbuilder to create a kind of smart form that recognizes from which page it was called.

step 1) make $_SERVER["HTTP_REFERER"] (which is the page from which the form was called) available using a hidden input element, so that it can be sent along with the form email

step 2) analyse $_SERVER["HTTP_REFERER"], compare with corresponding values of items in a dropdown-list and if found, preselect it


An alternative might involve some kind of dummy-links, e.g.: http://mycmsms.com/myform/refererpagealias ...whereas http://mycmsms.com/myform would load the form and refererpagealias would be passed to it as a php get-parameter, requiring some mod_reqrite conditions and equivalent procedings as for the two aforementioned steps.


Anyone have an idea on how I can get something like that to work?