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.
[SOLVED] Undefined index not sure where i'm going wrong
Moderator: General Moderators
-
PAW Projects
- Forum Commoner
- Posts: 30
- Joined: Tue Jun 15, 2004 7:43 am
- Contact:
-
stantheman
- Forum Commoner
- Posts: 38
- Joined: Wed May 26, 2004 8:57 am
-
PAW Projects
- Forum Commoner
- Posts: 30
- Joined: Tue Jun 15, 2004 7:43 am
- Contact:
Code: Select all
<?
if (isset($_POST['q1'])) {
echo 'The first box has been checked!';
} else {
echo 'The first box has NOT been checked!';
}
?>-
stantheman
- Forum Commoner
- Posts: 38
- Joined: Wed May 26, 2004 8:57 am