Quote:
|
Originally Posted by bloxar
<form name=”myProductForm” method=”post” action=”my_pdetails_form_.php” >
<input type=”hidden” name=”ref” value=”<?php echo $ref; ?>”/>
|
This only works if register globals is set to on.
To make it work with register globals off replace echo $ref; with:
echo $_SERVER['REQUEST_METHOD'] == 'POST ? $_POST['ref'] : $_GET['ref'];
Or use $_GET on the 1st form and $_POST on the subsequent forms.
Quote:
|
Note: if you want to track from where the form was called o you want to perform a little bit of security stuff use something like this $called_from= getenv('HTTP_REFERER'); this will output the referred url from your form was requested.
|
This is not always true, users of certain firewalls will block this information and therefore you cannot rely on it being present.