prepare($sql)){ $stmt->bind_param("s", $param_username); $param_username = $username; if($stmt->execute()){ $stmt->store_result(); if($stmt->num_rows == 1){ $stmt->bind_result($id, $username, $hashed_password); if($stmt->fetch()){ if(password_verify($password, $hashed_password)){ session_start(); $_SESSION["loggedin"] = true; $_SESSION["user_id"] = $id; $_SESSION["username"] = $username; header("location: index.php"); } else{ $login_err = "Ungültiger Benutzername oder Passwort."; } } } else{ $login_err = "Ungültiger Benutzername oder Passwort."; } } else{ $login_err = "Oops! Etwas ist schief gelaufen."; } $stmt->close(); } } $mysqli->close(); } define('APP_VERSION', '8.3.0'); ?> Login - Cazubu
Cazubu Logo

Cazubu Login

' . htmlspecialchars($login_err) . '
'; } ?>
" method="post">

Noch kein Konto? Jetzt registrieren