Whirlpool / PHP
#3

use strcasecmp or just strtoupper or strtolower

strcasecmp :
pawn Code:
if($username == $dbusername && strcasecmp($pass, $dbpassword) == 0) //if username is same as one from table and if password is the same as one from table...
{
    $_SESSION['username'] = $dbusername; //setting session username to one from table, this is useful if you login, that restart your browser and than you go in url where is your profile.php... Anyway this is useful :D
    echo header('location: profile.php'); //redirecting user to his profile page (profile.php)
}
strtoupper :
pawn Code:
if($username == $dbusername && strtoupper($pass) == $dbpassword) //if username is same as one from table and if password is the same as one from table...
{
    $_SESSION['username'] = $dbusername; //setting session username to one from table, this is useful if you login, that restart your browser and than you go in url where is your profile.php... Anyway this is useful :D
    echo header('location: profile.php'); //redirecting user to his profile page (profile.php)
}
strtolower
pawn Code:
if($username == $dbusername && $pass == strtolower($dbpassword)) //if username is same as one from table and if password is the same as one from table...
{
    $_SESSION['username'] = $dbusername; //setting session username to one from table, this is useful if you login, that restart your browser and than you go in url where is your profile.php... Anyway this is useful :D
    echo header('location: profile.php'); //redirecting user to his profile page (profile.php)
}
Btw, $username == $dbusername is useless
Reply


Messages In This Thread
Whirlpool / PHP - by acade - 11.01.2015, 01:42
Re: Whirlpool / PHP - by acade - 11.01.2015, 17:07
Re: Whirlpool / PHP - by rickisme - 11.01.2015, 17:16
Re: Whirlpool / PHP - by www - 11.01.2015, 18:39
Re: Whirlpool / PHP - by Ahmad45123 - 11.01.2015, 19:24
Re: Whirlpool / PHP - by Vince - 11.01.2015, 20:12

Forum Jump:


Users browsing this thread: 1 Guest(s)