perhaps a using a database(sql, or ms access) and like assign each question with an id, then randomize it and pull it from the database, and have a checkanswer() function that looks at the ID of the question and will check if the answer is right or not, and how to handle it? (like if its not correct it will show the correct answer and deduct the users correct answer) uhm, something like that maybe, just an idea, if u have code im sure many of us here could assist.
joedeene
Hi,
I was thinking of writing a xml file with all the questions and then read this file in to the page and save it to a directory.i.e to add an XML Question Bank.
Questions.xml
<?xml version="1.0"?>
<QUESTIONS bank_id="General Knowledge">
<QUESTION No="1">
What is the color of sky?
<ANSWER No="1">Red</ANSWER>
<ANSWER No="2" right="true">Blue</ANSWER>
<ANSWER No="3">Brown</ANSWER>
<ANSWER No="4">Green</ANSWER>
</QUESTION>
<QUESTION No="2">
What is the color of Grass?
<ANSWER No="1">Red</ANSWER>
<ANSWER No="2">Blue</ANSWER>
<ANSWER No="3">Brown</ANSWER>
<ANSWER No="4" right="true">Green</ANSWER>
</QUESTION>
</QUESTIONS>
How abt this??but i dont know exactly how to read this file in to the page and then validate.
Best Regards,
Goutham