Page 2 of 2

Posted: Tue Jun 15, 2004 8:22 am
by PAW Projects
Excellent!

You're getting that error because you're checking $_POST['q1'] for its value, while it isn't set (you didn't check the q1 checkbox).
Instead of checking the value, check if $_POST['q1'] is set first.
The same goes for q2 obviously.

Posted: Tue Jun 15, 2004 8:23 am
by stantheman
When i check them i get my value but when unchecked like you say i get undefined how to i work around not having them checked

Posted: Tue Jun 15, 2004 8:24 am
by PAW Projects

Code: Select all

<?

if (isset($_POST['q1'])) {
  echo 'The first box has been checked!';
} else {
  echo 'The first box has NOT been checked!';
}

?>

Posted: Tue Jun 15, 2004 8:29 am
by stantheman
THanks it works know, Thanks for all the help i'm new to this php stuff, I'll get the hang of it soon. Thanks AGain for everones help