Пример #1
0
if ($_SESSION['loggedin'] == false) {
    header("Location: index.php");
    exit;
}
$restaurant = new Restaurant();
$reservation = new Reservation();
if (isset($_POST['sendreservation'])) {
    try {
        $reservation->Name = $_POST['reservationname'];
        $reservation->PhoneNumber = $_POST['phonenumber'];
        $reservation->Date = $_POST['date'];
        $reservation->StartHour = $_POST['starthour'];
        $reservation->EndHour = $_POST['endhour'];
        $reservation->NumberOfPeople = $_POST['numberofpeople'];
        $reservation->RestaurantId = $_SESSION['restaurantId'];
        $reservation->makeReservation();
    } catch (Exception $e) {
        $feedback = $e->getMessage();
    }
}
?>
<html lang="en">
 <head>
 	<meta charset="UTF-8">
 	<title>Restorapp</title>
 	<link rel="stylesheet" href="css/reset.css">
 	<link rel="stylesheet" href="css/screen.css">
 </head>
 <body>
 	
	<div id="login">