Hi everybody
I am creating a quiz. On the question page, students see a picture (for example a box) they have to descrive the shape of. They can select the answer from a menu called SHAPE and they can chooce between the answer “round” and “ square”. After clicking on the “check my answer” button, they answer the student gave is compared with the answer I put in the database. So far no problems. But I have no idea how to program the next part:
If the answer is wrong (for example picture 1 is a round box and the student answers with square, than after clicking on the “check my answer” button, he will be transferred back to the question page but this time a red box is around the SHAPE menu, indicating that this answer is wrong.
–> does anyone know how to do this?
(I added a picture that shows the database flowchart. Questions is the name of the database. Subheads are picture 1 to 3. And every picture subhead has the same subsubheads. )
This is the part on the question page:
[code]<?php
$array_shape = Array(“round”,“square”); these are the answers student scan choose between
?>
This is the part on the result page:
[code]<?php
error_reporting ( E_ALL | E_STRICT );
ini_set ( ‘display_errors’, 1 );
?>
"; if ($result = mysql_query($query)) { if (mysql_num_rows($result)<>0) { while ( $row = mysql_fetch_assoc ( $result ) ) { echo "
"; }} ?>
[/code]