A simple PHP quiz.
If you want to implement this quiz into your Wordpress site or other PHP site, just follow the instructions below:
- Download Source Code
- Paste code from quiz.php into your php file where you want the quiz to show up
- Paste the css styles from styles.css into your main css file, or import the styles.css file
- edit the questions and use the quiz!
- Optionally, you can put the PHP in a separate file and change the form action to the location of your php file so that when a user clicks "submit quiz" they are taken to a results page.
I made this quiz in an afternoon, so don't expect it to be the best, or the leanest code. If you need something simple, feel free to use it, hack it, whatever you want.
Finally, if you want to make improvements, feel free to fork me.
If you have any questions, open an issue or tweet to @ArelEnglish