"Kate" <an**@anon.net> wrote in message
news:B7*******************@wards.force9.net...
I have an PHP page that contains several checkboxes. I need to know if the
user has check all of the checkboxes before they can proceed to the next
page.
How do I check there status?
And can I put a conditon on a Submit button so that when they press Submit
it will only open the next page if all boxes are checked??
OK, sort of talking about 2 different things.
1) verify selection before going to next page.
Since you placed this on the PHP news, I can only assume you are thinking of
this via PHP.
So, yes, you can check the values of checkboxes from PHP, but only after the
form is submitted.
google $_POST and $_GET to see how
2) only submit if all checked
that is a client side operation, and PHP has no control over that.
for this you need client-side Javascript.
and the easiest way to do that is to go get a nice form validation class
from...
http://groups.yahoo.com/group/javascript_validation
all you need to do is add a few custom attributes to the checkbox tags,
include the JS class file and your ready to go.
Hope this helps in some way.
Walter