...

View Full Version : referral page



kenny873
04-01-2003, 04:09 AM
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?

Spookster
04-01-2003, 04:41 AM
How are you directing people in the f_add.php page?

missing-score
04-03-2003, 09:09 PM
// You will have to do all your logging in stuff,
// I am using the var $is_logged_in to check
// login status.

if($is_logged_in)
{
header($_SERVER['HTTP_REFERER']);
}
else
{
// FAIL LOGIN
}


I have never used http_referer ( dunno why :D ) but thats what I would try.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum