Commit c66eabb9 authored by uoure's avatar uoure
Browse files

Delete showReservation.php

parent 0fc2ac6d
<?PHP
$user = 'apache';
$pass = 'e164AzpQx564TpJa';
$db = new PDO('mysql:host=localhost;dbname=reservation', $user, $pass);
$statement = $db -> prepare("SELECT o.date, r.start, r.end, r.tisch FROM opening o, reservation r WHERE r.opening = o.id AND r.code = ? AND (date > ? OR (date = ? AND end > ?))");
$statement->execute(array($_POST["code"], date("Y-m-d"), date("Y-m-d"), date("H:i")));
if ($statement->rowCount() == 1) {
$data = $statement->fetch();
echo "Der Tisch " . $data["tisch"] . " ist am " . $data["date"] . " von " . $data["start"] . " bis " . $data["end"] . " reserviert.";
} else {
echo "-1";
}
?>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment