Simple Quiz
Save this script as quiz.php and guess how many lines this script has.
<?php
$status="How many lines this script have ?";
$n = "34";
$test=$HTTP_POST_VARS["ftest"];
$number=$HTTP_POST_VARS["fnumber"];
if($test=="1")
{
if($n==$number) $status="Correct :-)";
if($n>$number) $status="No, more than that :-(";
if($n<$number) $status="No, less than that :-(";
}
?>
<html><head>
<title>Simple Quiz</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body>
<form name="form1" method="post" action="quiz.php">
<table width="75%" border="0" cellpadding="4" cellspacing="0" bgcolor="#EEEEEE">
<tr>
<td width="30%"> </td>
<td width="70%"><?php print $status; ?></td>
</tr>
<tr>
<td width="30%"><div align="right">Enter number of lines : </div></td>
<td width="70%"><input name="fnumber" type="text" id="fnumber" size="4" maxlength="4"></td>
</tr>
<tr>
<td width="30%"> </td>
<td width="70%"><input type="submit" name="Submit" value="Submit"> <input name="ftest"
type="hidden" id="ftest" value="1"></td>
</tr>
</table>
</form>
</body></html>