Simple page redirection in php (referred url redirection)?
Posted: Tue Jul 26, 2011 6:17 am
hello .. i have some PHP web pages in which i have LOGIN.PHP , profile.php and another pages in PHP ..
now some of the pages needs to be logged in by user then only we can see those ..
i have my login page in which if the USERNAME, PASSWORD is correct then he will be redirected to only PROFILE.PHP page coz i have used
--------------------------------------…
header('Location:profile.php')
--------------------------------------…
but suppose here if the user is another page and bcoz of hes not logged in hes redirecting to LOGIN.PHP and now he has written the right account details .. then he must be gone to the PARTICULAR PAGE which he was trying to see b4 login instead of the PROFILE.PHP page ..
how can i do it .. how can i redirect the USER right into that page after login which he wanted to see b4 login ..
(referred url redirection) i think its called .. how to do this ..
now some of the pages needs to be logged in by user then only we can see those ..
i have my login page in which if the USERNAME, PASSWORD is correct then he will be redirected to only PROFILE.PHP page coz i have used
--------------------------------------…
header('Location:profile.php')
--------------------------------------…
but suppose here if the user is another page and bcoz of hes not logged in hes redirecting to LOGIN.PHP and now he has written the right account details .. then he must be gone to the PARTICULAR PAGE which he was trying to see b4 login instead of the PROFILE.PHP page ..
how can i do it .. how can i redirect the USER right into that page after login which he wanted to see b4 login ..
(referred url redirection) i think its called .. how to do this ..