07-03-2008, 08:29 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: May 2008
Location: Québec
Posts: 104
Thanks: 10
|
Login and redirect after.
Good day to you all,
I have a login script which I would like the good user to be redirected.
I know how to redirect a page but I don't know how to make it redirect to a after the login process.
PHP Code:
<?
$u = $_POST['username']; //username from form $p = $_POST['password']; // password from form.
if($u == "user1" && $p == "pass" || $u == "user2" && $p == "pass" || $u == "user3" && $p == "pass"){ $_SESSION['user'] = $u; $_SESSION['logged'] = "yes" header("location:auth.php"); exit; }else{
print "username or pass was incorrect"; } ?>
Can somebody help me ?
Thanks !
__________________
That's why we are not alone on earth... let's build !
|
|
|
|