[PHP/MYSQL]WP_HASH
#7

Quote:
Originally Posted by vital2k
Посмотреть сообщение
I'm just gonna say, the SA-MP encryption methods are usually in all capitals where as in PHP they are not, best to strtoupper($password) before comparing the strings.

Try doing this

PHP код:
if(!isset($_SESSION["username"]))  $result mysql_query("SELECT * FROM `players` WHERE Name='$username' AND Password=strtoupper(hash( 'whirlpool',$password))"); 
For better management i tend to do any thing I need to prior to using it so I would

PHP код:
$hashedPassword strtoupper(hash'whirlpool',$password));
if(!isset(
$_SESSION["username"]))  $result mysql_query("SELECT * FROM `players` WHERE Name='$username' AND Password='$hashedPassword'"); 
Thanks its works.
Reply


Messages In This Thread
[PHP/MYSQL]WP_HASH - by aivarasz - 09.02.2012, 16:17
Re: [PHP/MYSQL]WP_HASH - by Niko_boy - 09.02.2012, 16:20
Re: [PHP/MYSQL]WP_HASH - by [HiC]TheKiller - 09.02.2012, 18:03
Re: [PHP/MYSQL]WP_HASH - by aivarasz - 10.02.2012, 15:19
Re: [PHP/MYSQL]WP_HASH - by aivarasz - 11.02.2012, 12:25
Re: [PHP/MYSQL]WP_HASH - by vital2k - 11.02.2012, 12:39
Re: [PHP/MYSQL]WP_HASH - by aivarasz - 11.02.2012, 14:01
Re: [PHP/MYSQL]WP_HASH - by vital2k - 11.02.2012, 17:01
Re: [PHP/MYSQL]WP_HASH - by DandyCorleone - 04.01.2017, 12:10

Forum Jump:


Users browsing this thread: 1 Guest(s)