include "./include/db.php"; include "./include/function.php"; if(isset($_POST["username"])){ $check_login = getResult("select * from user where login='".$_POST["username"]."' and passwd='".$_POST["password"]."'"); $check_record = getResult("select * from t_ticket where tid='".$_POST["id"]."' and userid='".$check_login[0]["id"]."'"); if(isset($check_login) && isset($check_record)){ setcookie("ticket_id", $_POST["id"], time()+1800); setcookie("ticket_uid", $check_login[0]["id"], time()+1800); setcookie("ticket_pass", $check_login[0]["passwd"], time()+1800); header("Location: rm_ticket.php"); exit(); } } if(!isset($_GET["id"])){ $_GET["id"] = $_POST["id"]; } ?>
退票系統中,如果你擁有兩張門票,就算選擇退一張,也可以的。
名稱 | 尚餘門票 | 截步日期 |
" . $ticket[$i]["name"] . " | ".$ticket[$i]["current_ticket"]." | ".date("d/m/Y", $ticket[$i]["due_date"])." |
} ?>