Validating checkboxes in php
You want to make sure only valid checkboxes are checked.For a single checkbox, ensure that if a value is supplied, it's the correct one.Code: [Select]$result = mysql_query("SELECT * FROM course") or die(mysql_error()); if ($result) Help needed purely on php codes.
Then, use array_intersect( ) to ensure that the set of submitted values is contained within the set of acceptable values, as shown in Example 9-15. Checkboxes have the same issues with default values as do radio buttons.
The session usually lives for 24 minutes after the last HTTP request. I just realized that Sniper Code Sheva did post something pretty similar to Ray (but I don't think it would have worked in it's current state) and I should award that points instead of the j Query post!
Please could admin help me out and allow me to change the points assignment.
If a value isn't supplied for the checkbox, then the box wasn't checked.
Example 9-14 figures out whether a checkbox was checked, unchecked, or had an invalid value submitted.Hi guys, I'm trying to build a multiple choice question panel and would like to know how do I go about creating a validation script where a pop-up would appear, if the user chooses either a right or wrong answer?