using checkboxes
Posted: Tue Jun 24, 2003 7:14 am
I've been working my way through the PHP Beginners Tutorial (http://www.phpcomplete.com/tutorials/?i ... adtutorial) - I'm following the logic and even able to do some problem solving when stuff isn't working but I've come up against one I have no idea how to clear up. I've got to "checkboxes" - I've set up an HTML form with two checkboxes and a submit and then set up a checkboxTest.php - code:
<?php
if($Checkbox1)
{
echo("The first checkbox was checked<br>\n");
}
if($Checkbox2)
{
echo("The second checkbox was checked<br>\n");
}
?>
With the code this way - nothing happens.
The obvious candidate to change is the "if"
if $_POST['Checkbox1']
However that returns an error message about expecting '(' in line 2 so I have no idea what else to try.
Please help.
thanks
Judith
There's also a second
<?php
if($Checkbox1)
{
echo("The first checkbox was checked<br>\n");
}
if($Checkbox2)
{
echo("The second checkbox was checked<br>\n");
}
?>
With the code this way - nothing happens.
The obvious candidate to change is the "if"
if $_POST['Checkbox1']
However that returns an error message about expecting '(' in line 2 so I have no idea what else to try.
Please help.
thanks
Judith
There's also a second