<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>mypage</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
请输入你的成绩:
<input type="text" name="score" id="score" size="8" />
<input type="submit" name="button" id="button" value="提交" />
</form>
</body>
</html>
<?php
if (isset($_POST['score'])) {
$score=$_POST['score']=100;
echo "$score"."分"."<br>";
switch ($score/10) {
case 10:
case 9:
echo "优秀";
break;
case 8:
case 7:
echo "良好";
break;
case 6:
echo "合格";
break;
case 5:
case 4:
case 3:
case 2:
case 1:
case 0:
echo "不合格";
break;
default:
echo "出错";
break;
}
}
?>
<br>
<?php
for ($i=1;$i<=9;$i++) {
for ($j=1;$j<=$i;$j++)
echo $i*$j."";
echo "<br>";
}
?>
<?php
for ($x=0;$x<=44;$x++)
for ($y=0;$y<=44;$y++)
if ($x*$x=$y*$y<=1989)
{ echo "x=".$x;
echo "y=".$y;
echo "<br>";}
?>