[PHP]whirlpool hash [+REP]
#8

Quote:
Originally Posted by Isolated
Посмотреть сообщение
No don't use MD5, it's outed dated and not considered a good practice, use:

PHP код:
hash('Whirlpool'$stringtohash); 
So your code would be like this:

PHP код:
            while($row mysql_fetch_assoc($query)) //loop thought table that we select in mysql_query
            
{
                
$dbusername $row['Username']; //setting dbusername as variable from table, change 'username' to your field!
                
$dbpassword hash('whirlpool'$row['Password']); //setting dbpassword as variable from table, change 'password' to your field!
            
}
            if(
$username == $dbusername && hash('whirlpool'$password) == $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)
            

Also remember this isn't a PHP site, and you could have easily found it by searching..

Remember that you will need to update your register side: INSERT INTO.
i entered the password to login but i get error
"You Have Entred a Wrong Username Or Password !"
Reply


Messages In This Thread
[PHP]whirlpool hash [+REP] - by simo0000 - 28.02.2015, 15:51
Re : [PHP]whirlpool hash [+REP] - by simo0000 - 28.02.2015, 16:08
Re: [PHP]whirlpool hash [+REP] - by vannesenn - 28.02.2015, 16:11
Re: [PHP]whirlpool hash [+REP] - by Isolated - 28.02.2015, 16:14
Re : Re: [PHP]whirlpool hash [+REP] - by simo0000 - 28.02.2015, 16:14
Re : Re: [PHP]whirlpool hash [+REP] - by simo0000 - 28.02.2015, 16:17
Re: [PHP]whirlpool hash [+REP] - by Isolated - 28.02.2015, 16:19
Re : Re: [PHP]whirlpool hash [+REP] - by simo0000 - 28.02.2015, 16:30
Re: [PHP]whirlpool hash [+REP] - by Isolated - 28.02.2015, 16:34

Forum Jump:


Users browsing this thread: 1 Guest(s)