📄 index.php
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>在线考试系统</title>
</head>
<body>
<p align="center"><b><font size="6" face="华文仿宋" color="#0000FF">在线考试系统</font></b></p>
<hr>
<table border="1" width="100%">
<tr>
<td width="96">
<p align="center">题号</td>
<td width="538">
<p align="center">题目</td>
<td >
<p align="center">答案</td>
<td width="90">
<p align="center">评分</td>
</tr>
</table>
<?php
require_once("config.inc.php");
$link=mysql_connect($DBHOST,$DBUSER,$DBPWD);
mysql_select_db($DBNAME);
$query="select * from `text` ORDER BY `uid`";
$result=mysql_query($query);
$rows=mysql_num_rows($result);
for ($i=1;$i<=$rows;$i++)
{
list($uid,$ask,$key)=mysql_fetch_row($result);
echo "<table>";
if($uid!="")
{
echo "<table border=1 width=100%>";
echo "<tr><td width=96><p align=center>".$uid."</td>";
echo "<td width=538><p align=left>".$ask."</td>";
echo "<td><p align=center><form method=POST action=index.php><p><input type=text name=$uid size=20><input type=submit value=提交 name=B1><input type=reset value=重置 name=B2></p></form><p></td>";
if(empty($$uid))
{$$uid="";
$check="";
}
else
{if($$uid==$key)
$check=" √";
else $check=" ×";
}
echo "<td width=90><p align=center>".$$uid.$check."</td></tr></table>";
}
echo "</table>";
}
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -