コード例 #1
0
$db->connect();
if ($_SESSION["user_type"] == 2) {
    $db->getList($_POST["retreive"]);
    // print("<form action='function.php'>");
    // print("<button class='btn btn-lg' type='submit'>GO BACK TO SEARCH</button>");
    // print("</form>");
} else {
    // print("<form action='function.php'>");
    // print("<button class='btn btn-lg' type='submit'>GO BACK TO SEARCH</button>");
    // print("</form>");
}
//$db->disconnect();
?>
</div> <!-- /container -->

<?php 
if (!empty($_POST['book'])) {
    $flightID = $_POST['book'];
    $userID = $_SESSION["user_id"];
    $db->book($userID, $flightID);
}
if (!empty($_POST['cancel'])) {
    $flightID = $_POST['cancel'];
    $userID = $_SESSION["user_id"];
    $db->cancel($userID, $flightID);
}
?>

</body>
</html>