diff --git a/src/server/cyberhex-code/system/insecure_zone/php/login.php b/src/server/cyberhex-code/system/insecure_zone/php/login.php index 8f230a9..86e01f4 100644 --- a/src/server/cyberhex-code/system/insecure_zone/php/login.php +++ b/src/server/cyberhex-code/system/insecure_zone/php/login.php @@ -27,61 +27,64 @@ +
+ + connect_error) { + die("Connection failed: " . $conn->connect_error); + } + $sql = "SELECT * FROM users WHERE username = ?"; + $stmt = $conn->prepare($sql); + $stmt->bind_param("s", $username); + + // Execute the statement + $stmt->execute(); + + // Get the result + $result = $stmt->get_result(); + + // Check if the user exists and verify the password + if ($result->num_rows > 0) { + $row = $result->fetch_assoc(); + if (password_verify($password, $row['password'])) { + echo ''; + } else { + echo ''; + } + } else { + echo ''; + } + + // Close the connection + $stmt->close(); + $conn->close(); + } + ?> + -connect_error) { - die("Connection failed: " . $conn->connect_error); - } - $sql = "SELECT * FROM users WHERE username = ?"; - $stmt = $conn->prepare($sql); - $stmt->bind_param("s", $username); - - // Execute the statement - $stmt->execute(); - - // Get the result - $result = $stmt->get_result(); - - // Check if the user exists and verify the password - if ($result->num_rows > 0) { - $row = $result->fetch_assoc(); - if (password_verify($password, $row['password'])) { - echo ''; - } else { - echo ''; - } - } else { - echo ''; - } - - // Close the connection - $stmt->close(); - $conn->close(); - } -?>