redirect - Reference Redirection in PHP -
this question has answer here:
- redirecting previous page after login? php 16 answers
i've redirected user if directly try access web pages without login. directly want open page after login, user has tried open before login.
suppose user has tried open reports.php without being logged in, first redirected login page, after login want redirect user directly on reports.php, tried open. code should implement in php files?
once see user anonymous , redirect him login page - add additional parameter script/page name. after successful login redirect user page.
for example, user wants access profile.php
secured. make
header("location: http://example.com/login.php?redirect=profile.php"); die();
at login.php
make him go with:
header("location: http://example.com/".$_get['redirect']); die();
Comments
Post a Comment