View Single Post
Old Feb 10th, 2006, 10:32 AM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Run this and watch your address bar and page.
[php]
<?php
if (!empty ($_GET ["CheckBox"])) echo $_GET ["CheckBox"]."<br/>";
else echo "I_don_be_checked<br/>";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Checkbox Check</title>
</head>
<body>
<form action="cbox.php" method="get" name="myForm">
<input name="ButtonWidget" type="submit" value="Submit">
<input name="CheckBox" type="checkbox" value="I_be_Checked">
</form>
</body>
</html>

[/php]
With a "post" method, same effect, you just won't see it in the address bar.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote