02.05.2017, 13:16
I can't just write you the code here because you won't learn too much, you will probably copy it, but I'll give you some help.
First, don't use mysql, use mysqli or PDO, mysql is old.
Check this out to learn how to load the password: https://www.w3schools.com/php/php_mysql_select.asp
and this: http://php.net/manual/ro/mysqli.query.php
This is how you should do it, load the hash from the database that you saved once he registered then get his input again, the password that he wrote in the database and hash it, again, then compare it with the hash that you got from the database.
If you also want this to work with SAMP then you will need to make the hash upper case, use
to do that.
Read more here: http://php.net/manual/ro/function.strtoupper.php
First, don't use mysql, use mysqli or PDO, mysql is old.
Check this out to learn how to load the password: https://www.w3schools.com/php/php_mysql_select.asp
and this: http://php.net/manual/ro/mysqli.query.php
This is how you should do it, load the hash from the database that you saved once he registered then get his input again, the password that he wrote in the database and hash it, again, then compare it with the hash that you got from the database.
If you also want this to work with SAMP then you will need to make the hash upper case, use
PHP код:
strtoupper(string);
Read more here: http://php.net/manual/ro/function.strtoupper.php