I want to make a timed interactive trivia using PHP & JS. I want it to be like whenever the user chooses to start playing. It displays an image that contains the question plus another 4 images that contain the answers for the user to choose the right one from plus the timer that shows the time counting down. Whenever the user selects an answer the timer stops & the color of the image the user has selected turns either red or green to show him/her if the answer is right or wrong. that should remain for 2 or 3 seconds & after that a new question appears & the whole process gets repeated until the user reaches question number 10.
The questions should be displayed randomly from the database & each question should not be displayed twice until the end of the trivia. The score should be calculated depending on the user's choice & the time he/she took to select the answer (i.e. if the user selects the right answer after 2 seconds he/she gets for example 2000 points if the choice was made later on the score is decreased etc..). The score should be accumilative as the user goes on with the questions until the end of the trivia.
Finally, the score is displayed, saved in the mySQL database, & whenever the user tries to access the ranking table, it calls his score from the database, locates & displays his/her rank depending on the score. If he/she plays another trivia, the score gets added & displayed. One last thing is that trivia game should be a single or multiplayer game.
It seems complicated & actually I tried to edit some trivia I got from a forum but I have some problems displaying the images stored in mySQL database as it displays ASCII code instead of the image & it's a single user game that doesn't calculate or accumilate the user's score. that's why I thought I should start doing it from the beginning.
I'm a PHP & JS beginner so I need to know how to do that & how to start.
The questions should be displayed randomly from the database & each question should not be displayed twice until the end of the trivia. The score should be calculated depending on the user's choice & the time he/she took to select the answer (i.e. if the user selects the right answer after 2 seconds he/she gets for example 2000 points if the choice was made later on the score is decreased etc..). The score should be accumilative as the user goes on with the questions until the end of the trivia.
Finally, the score is displayed, saved in the mySQL database, & whenever the user tries to access the ranking table, it calls his score from the database, locates & displays his/her rank depending on the score. If he/she plays another trivia, the score gets added & displayed. One last thing is that trivia game should be a single or multiplayer game.
It seems complicated & actually I tried to edit some trivia I got from a forum but I have some problems displaying the images stored in mySQL database as it displays ASCII code instead of the image & it's a single user game that doesn't calculate or accumilate the user's score. that's why I thought I should start doing it from the beginning.
I'm a PHP & JS beginner so I need to know how to do that & how to start.