I have 2 Hidden fields on a form. One to capture the referrer and the other for the page url...
I put this in viewfunctions.php:
//Form 9
if($form_id == 16 && $row['element_id'] == 6){
$element[$j]->default_value = $HTTP_SERVER_VARS["HTTP_REFERER"];
}
if($form_id == 16 && $row['element_id'] == 7){
$element[$j]->default_value = $HTTP_SERVER_VARS['REQUEST_URI'];
}
but when I view the source on the front I see this:
<li id="li_6" >
<label class="description" for="element_6"> </label>
<div>
<input id="element_6" name="element_6" class="element text small" type="text" value="" />
</div>
</li>
<li id="li_7" >
<label class="description" for="element_7"> </label>
<div>
<input id="element_7" name="element_7" class="element text small" type="text" value="" />
</div>
</li>
Now I know the $HTTP_SERVER_VARS["HTTP_REFERER"]; should be empty since i hit the page stright on, but I'm not getting the $HTTP_SERVER_VARS['REQUEST_URI'];
I've tried using <?php echo $HTTP_SERVER_VARS['REQUEST_URI']; ?> on a blank page and it works that way.
What am I doing wrong?