jamez100
09-22-2009, 10:50 AM
Hi there
Further to my post yesterday about processing webform, thanks I now have it working (mostly).
But I'm having problems processing a check box.
I just need to set the variable to 'checked' or 'unchecked' for the checkbox.
Here my code so far.
$ch1 = 'unchecked';
if ($ch1 = 'yes') {
$ch1 = 'checked';
}
if ($ch1 == 'checked') {
$ch1 = 'The checkbox is checked';
}
else
{
$ch1 = 'The checkbox is unchecked';
}
At the moment the vaule return is 'checked' whether the checkbox is actually ticked or not (always returns true).
Thanks, James
Further to my post yesterday about processing webform, thanks I now have it working (mostly).
But I'm having problems processing a check box.
I just need to set the variable to 'checked' or 'unchecked' for the checkbox.
Here my code so far.
$ch1 = 'unchecked';
if ($ch1 = 'yes') {
$ch1 = 'checked';
}
if ($ch1 == 'checked') {
$ch1 = 'The checkbox is checked';
}
else
{
$ch1 = 'The checkbox is unchecked';
}
At the moment the vaule return is 'checked' whether the checkbox is actually ticked or not (always returns true).
Thanks, James