本文整理汇总了PHP中Reservation::makeReservation方法的典型用法代码示例。如果您正苦于以下问题:PHP Reservation::makeReservation方法的具体用法?PHP Reservation::makeReservation怎么用?PHP Reservation::makeReservation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reservation
的用法示例。
在下文中一共展示了Reservation::makeReservation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
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">