M5 A1 fertig
This commit is contained in:
@@ -13,15 +13,14 @@ function anmelden(string $email, string $passwort)
|
||||
|
||||
if ($row['passwort'] == NULL) {
|
||||
$row = 0;
|
||||
}
|
||||
elseif ($row['passwort'] == $passwort) {
|
||||
} elseif ($row['passwort'] == $passwort) {
|
||||
session_start();
|
||||
|
||||
mysqli_begin_transaction($link);
|
||||
$sql = "UPDATE benutzer SET letzteanmeldung = current_time, anzahlfehler = 0 WHERE email = '$email'";
|
||||
$link->query($sql);
|
||||
|
||||
$sql = "UPDATE benutzer SET anzahlanmeldungen = anzahlanmeldungen + 1 WHERE id = ".$row['id'];
|
||||
$sql = "UPDATE benutzer SET anzahlanmeldungen = anzahlanmeldungen + 1 WHERE id = " . $row['id'];
|
||||
$link->query($sql);
|
||||
|
||||
mysqli_commit($link);
|
||||
@@ -31,8 +30,7 @@ function anmelden(string $email, string $passwort)
|
||||
$_SESSION['name'] = $row['name'];
|
||||
$_SESSION['email'] = $row['email'];
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
mysqli_begin_transaction($link);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user