I would use array_diff.
The way you have your form setup, you should get an array of answers. Its really the easiest way to get data from a checkbox.
Try:
Your correct answers need to be in an array though, which isn't hard.
<?php
$options = $_POST['option'];
if ( count( array_diff( $answer,$options ) ) !== 0 ) {
//incorrect answer
}
?>
kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194