Here's one problem, you haven't given the checkbox field a value, so your script won't output anything. Second, you are using the $_GET superglobal to access 'Choice' when your HTML form is sending via the POST method, change one or the other.
checkbox.html
===============
<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=POST ACTION="checkbox.php">
Have you ever eaten haggis before?<INPUT NAME="Choice" TYPE="Checkbox" value='yes'>
<BR><BR><INPUT TYPE=SUBMIT>
</FORM>
</BODY></HTML>
Here you're passing the value of $_GET['Choice'] to $Choice by reference (that's what the amphersand does in the assignment). Why not just echo the orginal value and skip the extra step. Second, you aren't using any validation to check that the value of this variable exists.
Code:
// Original Code
checkbox.php
============
<HTML>
<HEAD></HEAD>
<BODY>
<?php
$Choice =& $_GET['Choice'];
echo $Choice;
?>
</BODY></HTML>
Since you're using the POST method in your HTML form, we'll access the variable via the POST superglobal array, and we'll use a little validation to make sure a value exists in the first place.
Code:
// Modified
<HTML>
<HEAD></HEAD>
<BODY>
<?php
if (isset($_POST['Choice']) && !empty($_POST['Choice']))
{
echo $_POST['Choice'];
}
else
{
echo 'You did not enter a value!';
}
?>
</BODY></HTML>
hth,
Rich
::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::