Login Protected Pages For Difference Users & redirected
Posted: Sun Dec 09, 2012 8:20 pm
How To Use Below code:
Just download the password protect zip or attached wbs file (Ready to use without changes), unzip it and to go verify page right click it and change the code to below code:
More Details Here:
https://www.wysiwygwebbuilder.com/password_protect.html
Download:
https://www.wysiwygwebbuilder.com/suppor ... rotect.zip
OR
Just download the password protect zip or attached wbs file (Ready to use without changes), unzip it and to go verify page right click it and change the code to below code:
Code: Select all
session_start();
$userInfo = array(
'user1' => array(
'password' => 'password1',
'page' => 'page1.php'
),
'user2' => array(
'password' => 'password2',
'page' => 'page2.php'
),
'user3' => array(
'password' => 'password3',
'page' => 'page3.php'
),
'user4' => array(
'password' => 'password4',
'page' => 'page4.php'
),
);
if (array_key_exists($_POST['username'], $userInfo) && $userInfo[$_POST['username']]['password'] == $_POST['password']) {
$page = 'http://yourdomainnamehere.com/logindemo/'. $userInfo[$_POST['username']]['page'];
$_SESSION['username'] = $_POST['username'];
}
else {
$page = 'http://yourdomainnamehere.com/filepath/login.php&login_error=1';
}
//echo $page .' here';exit();
header('Location: '. $page);
https://www.wysiwygwebbuilder.com/password_protect.html
Download:
https://www.wysiwygwebbuilder.com/suppor ... rotect.zip
OR