做了一个考试系统功能大致完成,唯有一步不知为何总是实现不到。当教师登录添加考题时,不能完整显示页面和表格。编辑按钮被主动隐藏了!不知道怎么办好!求大侠帮忙!谢谢!过两天就要交!十万火急啊!<?
session_start();
require("../conn.php");
$examid=$_REQUEST['examid'];
$sql="select * from exam_type where exam_id='{$examid}'";
$rs=mysql_query($sql,$conn);
if (mysql_num_rows($rs)==0) {
   $sql ="insert into exam_type (exam_id,exam_type_id,exam_type_name,auto_grade) values('{$examid}',1,'Individual choice',1)";
   mysql_query($sql,$conn) or die("Increase questions failure");
   $sql ="insert into exam_type (exam_id,exam_type_id,exam_type_name,auto_grade) values('{$examid}',2,'multiple-choice',1)";
   mysql_query($sql,$conn) or die("Increase questions failure");
   $sql ="insert into exam_type (exam_id,exam_type_id,exam_type_name,auto_grade) values('{$examid}',3,'Judgment question',1)";
   mysql_query($sql,$conn) or die("Increase questions failure");
}$sql="select * from exam_info,course where exam_info.course_id=course.course_id and exam_id='{$examid}'";
$rs=mysql_query($sql,$conn) or die("Inquires the papers failure1");
$row=mysql_fetch_array($rs);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Set of questions and papers</title>
</head><body>
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#007CD0" width="100%" id="AutoNumber2">
  <tr> 
    <td width="100%">Set papers basic information: add, modify papers name; Add, delete, modify paper topic</td>
  </tr>
</table>
<hr noshade color="#FFFFFF" size="1">
  
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#007CD0" width="97%" id="AutoNumber3" height="30" class="withborder" bgcolor="#F1F1F1">
  <tr> 
    <td colspan="3" align="center" class="noborder"><div align="left">The second step: set of questions and papers</div></td>
  </tr>
  <tr> 
    <td width="286"  class="noborder"><div align="center">Course name</div></td>
    <td width="528" ><div align="center">Papers name</div></td>
    <td width="126" align="center">Teacher</td>
  </tr>
  <tr> 
    <td  class="noborder"><? echo $row['course_name'];?></td>
    <td ><? echo $row['exam_title'];?></td>
    <td align="center"><? echo $row['exam_t_name'];?></td>
  </tr>
</table>
<br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#007CD0" width="1059"  bgcolor="#F1F1F1">
    <tr> 
      
    <td width="88" align="center" height="20">Questions serial number </td>
      
    <td align="center" >Topic name</td>
      <td width="142" align="center">operation </td>
    </tr>
<?
$sql="select * from exam_type where exam_id='{$examid}' order by exam_type_id";
$rs=mysql_query($sql,$conn) or die("Inquires the topic failure");
while ($row=mysql_fetch_array($rs)) {
?>
    <tr> 
      <td><? echo $row['exam_type_id'];?></td>
      <td><? echo $row['exam_type_name'];?></td>
      <td><div align="center"><a href="teach_exam_type_edit.php?id=<? echo $row['id'];?>&examid=<? echo $row['exam_id'];?>">Edit</a> 
      </div></td>
    </tr>
<?
}
?>
</table>
<br>
Explanation: serial number for 1, 2, 3 questions for the objective topic, can automatically score. Please keep the three questions. When a proposition, if no one topic title, don't need to increase the topic title. 
</body>
</html>