Return Back After Login Using PHP
Page 1 of 1
Return Back After Login Using PHP
# Return Back After Login!
in login page put this inside the login form
in login page put this inside the login form
- Code:
<input type="hidden" name="redirurl" value="<? echo $_SERVER['HTTP_REFERER']; ?>" />
- Code:
<?php
// put this on the login page at the bottom!
if(isset($_REQUEST['redirurl']) && isset($_SESSION["username"])) {
$url=$_REQUEST['redirurl']; // holds url for last page visited.
} else {
$url="/$db_username"; // Your Default URL Here!
header("Location:$url");
}
?>
Similar topics
» How to fix an error like etc/cron.daily/man-db exited with return code 2
» how to use usb to secure a pc login
» How to auto login linux kde and other environments
» Allow Domain Users To Login To Server 2016
» Bash Login Script & Password Generation Example
» how to use usb to secure a pc login
» How to auto login linux kde and other environments
» Allow Domain Users To Login To Server 2016
» Bash Login Script & Password Generation Example
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|