This commit is contained in:
wiecktobi 2018-06-18 22:44:43 +02:00
commit d7b4ff0738
3 changed files with 7 additions and 6 deletions

View File

@ -3,7 +3,6 @@
if(isset($_POST['tanID'])){ if(isset($_POST['tanID'])){
//echo "Tan ->" . $_POST['tan'] . "<-"; //echo "Tan ->" . $_POST['tan'] . "<-";
if($_POST['tanID'] != ""){ if($_POST['tanID'] != ""){
addEntry();
consumeTan($_POST['tanID']); consumeTan($_POST['tanID']);
} }
} }
@ -52,7 +51,7 @@
$stmt->execute(); $stmt->execute();
$stmt->close(); $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'] . "'"); $update = $database->query("UPDATE `tans` SET `used`= true WHERE `id` = '" . $_POST['tanID'] . "'");
echo "Tan verbraucht " . $_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['user'] = $object->id;
$_SESSION['username'] = $object->username; $_SESSION['username'] = $object->username;
echo "Einloggen erfolgreich <br> Willkommen " . $_SESSION['username']; echo "Einloggen erfolgreich <br> Willkommen " . $_SESSION['username'];
header("refresh:1;"); //header("refresh:1;");
header('Location: index.php?page=myFriendsBook');
} else { } else {
echo "Einloggen fehlgeschlagen"; echo "Einloggen fehlgeschlagen";
} }