Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- $sql = "SELECT Status FROM Users WHERE Username = ? AND Password = ?";
- $stmt = $conn->prepare($sql);
- $stmt->bind_param("ss", $_GET['username'], $_GET['password']);
- $stmt->execute();
- $result = $stmt->get_result();
- $rows = $result->fetch_all(MYSQLI_ASSOC);
- if ($result->num_rows > 0) {
- // output data of each row or remove while loop if you wish
- while($row = $result->fetch_assoc()) {
- echo "<b style='color:green'>Found</b>";
- }
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
- $sql = "SELECT Status FROM Users WHERE Username = ? AND Password = ?";
- $stmt = $conn->prepare($sql);
- $stmt->bind_param("ss", $_GET['username'], $_GET['password']);
- $stmt->execute();
- $result = $stmt->get_result();
- $rows = $result->fetch_all(MYSQLI_ASSOC);
- password_hash($_GET['password'], PASSWORD_DEFAULT);
- password_verify($_GET['password'], $hashedPasswordFromDatabase);
Add Comment
Please, Sign In to add comment