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'] : '';