minor changes

formatting and redirect after login
This commit is contained in:
Marcel Schwarz 2018-06-18 21:19:04 +02:00
parent 26ecb2596f
commit 55450d4ff4
3 changed files with 7 additions and 6 deletions

View File

@ -3,7 +3,6 @@
if(isset($_POST['tanID'])){
//echo "Tan ->" . $_POST['tan'] . "<-";
if($_POST['tanID'] != ""){
addEntry();
consumeTan($_POST['tanID']);
}
}
@ -52,7 +51,7 @@
$stmt->execute();
$stmt->close();
echo "Daten eingefuegt! <br>";
echo '<script> alert("Daten eingefuegt!"); </script>';
}
@ -93,6 +92,7 @@ function consumeTan($tanID) {
$update = $database->query("UPDATE `tans` SET `used`= true WHERE `id` = '" . $_POST['tanID'] . "'");
echo "Tan verbraucht " . $_POST['tanID'];
addEntry();
}
?>

View File

@ -15,7 +15,8 @@ if( (isset($_POST['loginName'])) && isset($_POST['loginPassword'])){
$_SESSION['user'] = $object->id;
$_SESSION['username'] = $object->username;
echo "Einloggen erfolgreich <br> Willkommen " . $_SESSION['username'];
header("refresh:1;");
//header("refresh:1;");
header('Location: index.php?page=myFriendsBook');
} else {
echo "Einloggen fehlgeschlagen";
}