Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //protect field against sql injections
- $username = mysqli_real_escape_string($connect, $username);
- $password = mysqli_real_escape_string($connect, $password);
- //encrypt password
- $hashFormat = "$2y$10$";
- $salt = "iusesomecrazystrings222222";
- $hashSalt = $hashFormat . $salt;
- $password = crypt($password, $hashSalt);
- $query = "INSERT INTO users(username,password) "
- . "VALUES ('$username', '$password')";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement