<?php
error_reporting(E_ALL);
$checked = isSet($_POST["checkbox"]);
?>
<!DOCTYPE html>
<html>
<head>
<title>Checkbox POST</title>
<head>
<body>
<h1>Checkbox POST</h1>
<?php
if (strToLower($_SERVER["REQUEST_METHOD"]) === "post")
{
?>
<p>The checkbox is <b><?php echo ($checked) ? "checked" : "not checked"; ?></b>.</p>
<?php
}
?>
<form method="post">
<p><input type="checkbox" name="checkbox" value="checked"></p>
<p><input type="submit" value="Check"></p>
</form>
<h2>Code</h2>
<?php echo highlight_file(__FILE__, true); ?>
<p><small>(Example made for <a href="http://gathering.tweakers.net/forum/list_messages/1431893">this topic</a> on <a href="http://gathering.tweakers.net/forum/">GoT</a>.)</small></p>
</body>
</html>
(Example made for this topic on GoT.)