Ich programmed a login panel but the Website says: "Failed to load resource: the server responded with a status of 500 (Internal Server Error)". I researched a bit, but i found nothing realy helpfull.
<head>
<meta charset="utf-8">
<title>Minehype | Adminlogin</title>
<link rel="stylesheet" href="../../css/adminlogin.css">
</head>
<body>
<?php
if(isset($_POST["submit"])) {
require("mysql.php");
$stmt = $mysql->prepare("SELECT * FROM accounts WHERE USERNAME = :user");
$stmt->bindParam(":user", $_POST["username"]);
$stmt->execute();
$count = $stmt->rowCount();
if($count == 0) {
$row = $stmt->fecth();
if(password_verify($_POST["password"], $row["PASSWORD"])) {
session_start();
$_SESSION["benutzer"] = $row["USERNAME"];
header("Location: geheim.php");
} else {
echo "Der Login ist Fehlgeschlagen!";
}
} else {
echo"Der Login ist fehlgeschlagen!"
}
}
?>
<form class="box" action="" method="post">
<h1> Admin Login </h1>
<form action="adminlogin.php" method="post">
<input type="benutzer" name="" placeholder="Benutzername">
<input type="password" name="" placeholder="Passwort">
<input type="submit" name="" value="Login">
</form>
</form>
</body>
Aucun commentaire:
Enregistrer un commentaire