Recording the referer page
In this article we are about to show you how you can record the page that user viewing before the submission of the form was made.
In order to achieve this just use the following code as a default value for a hidden field for example:
//<code> if(isset($_POST['form']['field_name'])){ return $_POST['form']['field_name']; }else{ return isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; } //</code>
19 persons found this article helpful.
You Should Also Read
How do I pass a parameter through the URL and how can I catch it ? HOT |
Mapping submission info to other database tables HOT |
How do I display the current URL HOT |