I am writing a forum add, f_add.php where it will check if the person has already login or not, if no, then it will go to the login page and then going back to the previouse f_add.php...
my problem is when the f_add.php directs the user to login.php, I use $_SERVER['HTTP_REFERER'] to remember the page it comes in, but it is not the f_add.php page but the page i visited before f_add.php....
so how can I implement this, so the user can login and redirect to the page they have requested?