| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Php Quiz Script
#28
Posted 20 October 2009 - 09:16 PM
maddog39, this is an excellent script. Thanks alot. Its very simple and can be easily modified. Could you kindly guide me as to how I may be able to validate the answers and also provide feedback.
For example if let say the examinee puts in 'A' but the correct answer is 'B' - how can I let the examinee know that the provided answer is 'Incorrect' and 'Why B is the correct answer'
Thanks for your help.
Aftab
-question by aftab
#30
Posted 08 November 2009 - 11:16 AM
<form action="two.php" method="post"> What is PHP?<br><br> <input type="radio" name="answer" value="1">Process Hosting Processor <br> <input type="radio" name="answer" value="2">Printing Hlocal Process <br> <input type="radio" name="answer" value="3">PHP:Hypertext Preprocessor<br> <input type="submit" value="Next question"> </form>Second page should look like this:
<form action="three.php" method="post"> <input type="hidden" name="firstq" value="<?php echo $_POST['answer']; ?>"> What is Firefox<br><br> <input type="radio" name="answer" value="1">Image tool <br> <input type="radio" name="answer" value="2">Web browser <br> <input type="radio" name="answer" value="3">Email client<br> <input type="submit" value="Next question"> </form>Third page should look like this:
<form action="result.php" method="post"> <input type="hidden" name="firstq" value="<?php echo $_POST['firstq']; ?>"> <input type="hidden" name="secondq" value="<?php echo $_POST['answer']; ?>"> What is IE?<br><br> <input type="radio" name="answer" value="1">Image tool <br> <input type="radio" name="answer" value="2">Web browser <br> <input type="radio" name="answer" value="3">Email client<br> <input type="submit" value="Next question"> </form>And the result should be somthing like this:
<?php echo $_POST[firstq]."<br>".$_POST[secondq]."<br>".$_POST[answer]; ?>Remember that this is only echoing the answer number,not the score.But this could help you to create quiz script.
#31
Posted 08 December 2009 - 08:00 AM
It's awesome!/txtmngr/images/smileys/smiley16.Gif
I think for guys that without programming skills, this willl be much complex. To delight, many free online quiz making service can help us make nice quiz and get embed codes for your website or blog. Here are some guidance to make quizzes for your website for guys that who want to make quizzes whether you have programming skills or not.
-reply by sare#32
Posted 03 March 2010 - 09:25 PM
Thanks for the quiz script, its great!
I'm wondering how to convert it into a two page quiz…
Page 1 would have 10 questions, page 2 would have 10 questions and then page 3 would be the results.
How do I make a "next page" button on page 1 that will also submit the selected answers to appear on page 3?
-reply by KathrynReply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users













