Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Check($username, $password) {
- if ($state = $mysqli->prepare("SELECT username, password FROM table-utenti WHERE username = ? LIMIT 1")) {
- $state->bind_param('s', $username);
- $state->execute();
- $state->store_result();
- $state->bind_result($db_username, $db_password, $db_nome);
- $state->fetch();
- $password = hash('sha512', $password);
- if($state->num_rows == 1) {
- if($db_password == $password) {
- // Password corretta!
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement