these are the screen shots for the php code that was used. i havent finished testing it so its not complete. We did this in todays class (25.02.13). The will be html on all pages so we must use dreamweaver. all ways use lower case for the html values and always set a value to call in the html.
she gave us a little bit of code for making the check boxes work:
page 3:
<form action="" method="post">
<input type="checkbox" name="check_list[]" alt="Checkbox" value="one">
<input type="checkbox" name="check_list[]" alt="Checkbox" value="two">
<input type="checkbox" name="check_list[]" alt="Checkbox" value="three">
<button type="submit">submit</button>
</form>
page 4:
<?php
echo "Check box test<pre>" ;
//print_r($check_list);
echo "</pre>";
if(!empty($_POST['check_list'])) {
foreach($_POST['check_list'] as $check) {
echo "check=$check<br>";
}
}
?>
this is all available on moodle titles display.php
she then gave a new task to do in our spare time:
titled student:
firstpage: knumber and password with submit button
second page: class with 4 radio button options
third page: fund money with 4 check boxes
forth page: details and confirmation