If only one checkbox can be selected, I'd suggest you use a radio button. That way there's a definite only one selected 😉
As for the multiple check-boxes.... a good browser will cache the answers. But if that's not what you want to do, then I'd suggest doing something like this:
<?php
$grades = array('Elementary', '1st Grade', '2nd Grade', '3rd Grade', '4th Grade', '5th Grade',
'6th Grade', '7th Grade', '8th Grade',
'9th Grade', '10th Grade', '11th Grade', '12th Grade');
foreach($grades as $grade) {
$selected = ((isset($_POST['GradeLevel'] && !empty($_POST['GradeLevel'])) ? (in_array($grade, $_POST['GradeLevel'])) : false;
echo '<input type="checkbox" name="GradeLevel[]" value="' . $grade . '"' . ($selected ? 'checked' : '') . '> <label for="' . $grade . '_chckbx">' . $grade . '<br />';
}
Now, the same type of thing can be done with a radio button. Same exact principle. Except that the conditional for $selected will be slightly different, more like:
$selected = ($video == $_SESSION['Video']);
Everything else pretty much the same. But like I said, you'd want to use "type='radio'" to ensure that only one selection per "name" is used (i.e. 1 video).