<?php
$result=mysql_connect("localhost","root")or die ("kj".mysql_error());
$k=mysql_select_db("userl",$result) or die ('Cant use foo : ' . mysql_error());
if (!$k){
echo "选择服务器失败";
}
$b=mysql_query("select content,works_name,ID,score,users_name from works where score='0'");
$n=1;
while($bl=mysql_fetch_array($b))
{
$n++;
echo "ID:"." ".$bl["ID"]." "."姓名:".$bl["users_name"]."  ".
"题目:"."《".$bl["works_name"]."》".
"<br>"."  "."内容"."  ".$bl["content"]."<br>";
echo "<html><form name='form1' method='post' action='fenshu.php'>
<input type='text' name='ID' placeholder='ID'/>
<br/>
<input type='text' name='scor' placeholder='分数'/>
<input type='submit' value='提交'/>
</form></html>";
}
?>
转载于:https://www.cnblogs.com/wuliao/p/5431156.html