Query for checking attempts

Hello All,
I need a help here. I am trying to make a quiz system but want to present it to a user with a condition.
Condition is that a user can only take thrice that quiz in a day. After it a message will be displayed that " You have made all three attempts today, now try after xx:xx:xx hrs".
secondly, i have sixty questions as of now and 20 can be answered in an attempt. is it possible that in all attempts, he get different questions?

I dont have any idea on point one, so didn’t wrote any code yet.

thanks
Shail

Are these users logging in to take the quizzes? If so, then you need a table to record the date and time that each user attempts a quiz, then next time they try a quiz, check that xx hours have passed.

i have made the table already… dont know how to check time

When the user clicks the link to start the quiz, capture the current time and store it in a field.
http://php.net/manual/en/ref.datetime.php

What school is it that is giving this assignment out?

1 Like

Not any school… just a page for fun nd checking current affair knowledge.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.