【发布时间】:2016-07-12 17:52:23
【问题描述】:
我目前正在做一个项目,以在用户输入教师 ID 时显示教师的时间表。我只想在他们单击提交后才显示表格,而不是在向他们询问 ID 时显示空表格。 这是我正在处理的代码的一部分。表格只应在点击提交按钮后显示。当前页面显示一个输入文本框、一个提交按钮和一个在点击提交按钮后填充的空表格。
<body>
<div class="container">
<h1>Faculty Timetable</h1>
<br>
<form method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?>" >
Enter Faculty Employee ID:<input type="text" name="FacEmployeeId">
<input type="submit" name="Submit">
<br><br>
<?php
//$facid="";
if($_SERVER["REQUEST_METHOD"]=="POST")
$facid=$_POST['FacEmployeeId'];
if(isset($facid)){
echo "<p align='center'><b>Timetable for Faculty ID ". $facid ."<br></b> ` `</p>";}
?>
<br><br>
<table id="table_id" class="table table-bordered">
<thead>
<tr>
<th> </th>
<th>8.00-8.50</th>
<th>9.00-9.50</th>
<th>10.00-10.50</th>
<th>11.00-11.50</th>
<th>11.50-13.00</th>
<th>13.00-13.50</th>
<th>14.00-14.50</th>
<th>14.55-.15.45</th>
<th>15.50-16.40</th>
<th>16.50-17.40</th>
</tr>
</thead>
【问题讨论】:
-
如果您需要隐藏某些内容,请查看基本 CSS 教程。
标签: javascript php html css