LJ Archive

Listing 2. Numbered Checklist

<HTML><BODY>
Check off the numbers you want to include:<P>
<?php
echo "<FORM action=\"respond2.php3\"
METHOD=GET">;
  for($i=0;$i<20;$i++)
    {
      echo "  $i";
      echo "<INPUT NAME=$i Type =
\"checkbox\"><P>\n";\
}
echo "<INPUT NAME=\"submit\"
type=\"submit\"></FORM>";\
#note quotes are escaped with backslash inside a
#quoted string
/* note that this is also a comment and the \n above makes the HTML
 more readable. It doesn't affect the user as browser sees it as white space */
?>
</BODY></HTML>
LJ Archive