Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("connect.php");
- if (isset($_SESSION["username"]))
- {
- $username = $_SESSION["username"];
- $password = $_SESSION["password"];
- $query = "select password from users where username = '$username'";
- $result = $mysqli->query($query);
- $rownum = mysqli_num_rows($result);
- if ($rownum == 1)
- {
- while(list($hash) = $result->fetch_row())
- {
- if (password_verify($password, $hash))
- {
- //do nothing
- }
- else
- {
- print ("<script> window.location.replace('https://firefly.uqcloud.net/App/Applogin.html'); </script>");
- }
- }
- }
- else
- {
- print ("<script> window.location.replace('https://firefly.uqcloud.net/App/Applogin.html'); </script>");
- }
- }
- else
- {
- print ("<script> window.location.replace('https://firefly.uqcloud.net/App/Applogin.html'); </script>");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement