本文整理匯總了PHP中Review::setFlightId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Review::setFlightId方法的具體用法?PHP Review::setFlightId怎麽用?PHP Review::setFlightId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Review
的用法示例。
在下文中一共展示了Review::setFlightId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
if (array_key_exists('flagForReadReview', $_REQUEST) && $_REQUEST['flagForReadReview']) {
$_SESSION['action'] = "readReview";
header("Location: ../controller/Controller.php");
}
}
}
}
}
$show_form = true;
if (isset($_POST['Write'])) {
$validator = new FormValidator();
$validator->addValidation("journeyDate", "req", "Please select a journey date");
$validator->addValidation("reviewDescription", "req", "Please enter a review description");
if ($validator->ValidateForm()) {
$review = new Review();
$review->setFlightId($_REQUEST['flightId']);
$review->setTravelDate($_REQUEST['journeyDate']);
$review->setReviewDescription($_REQUEST['reviewDescription']);
$_SESSION['review'] = serialize($review);
$_SESSION['action'] = "insertReview";
header("Location: ../controller/Controller.php");
} else {
echo "<B>Validation Errors:</B>";
$error_hash = $validator->GetErrors();
foreach ($error_hash as $inpname => $inp_err) {
echo "<p>{$inpname} : {$inp_err}</p>\n";
}
}
}
$disp_journeyDate = isset($_POST['journeyDate']) ? $_POST['journeyDate'] : '';
$disp_reviewDescription = isset($_POST['reviewDescription']) ? $_POST['reviewDescription'] : '';