Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap Part-2

In this tutorial I added one of the nice feature to this quiz application comparing previous one (Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap).

I added timer to this quiz application to indicate the time to left, to complete taken quiz. Once time left goes on to zero user taken quiz automatically submitted and declares results to the user.

Please refer next tutorial on this Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap Part-3 with some added functionality

Here is the demo of the quiz application

Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap

Demo

Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap

Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap

Step 1:

Before continuing this tutorial please refer my previous tutorial Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap for detailed information about this Quiz application.

Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap

Download

Step 2:

Add following jQuery following to questions.php file to add a timer to this quiz  application.

Following line of script will submit a form automatically after 1 minute.

Note :

If you want to set different time interval, you need to change the following two places. For example I am going to change from 1 minute to 5 minute.

 

 

Posted by:

muni

16 Comments

  1. Lawson -  November 23, 2013 - 9:10 pm

    Hi, How do i make a timer for each question. So once time runs out. It moves to the next question

    Reply
  2. Azizu -  January 16, 2014 - 5:59 pm

    Hi,
    How Can I show 5 Questions each page?

    Reply
  3. Joe Koder -  January 18, 2014 - 6:47 pm

    Your smart tutorial is not being smart using old mysql calls. You should be using mysqli or pdo.

    Additionally, the following query from questions.php line 15 can cause an error:

    mysql_query(“INSERT INTO users (id, user_name,score,category_id)VALUES (‘NULL’,'$name’,0,’$category’)”) or die(mysql_error());

    Since the id column is an auto increment and you are specifying column names in the query, there is no need for it. Correct query (without mysqli or pdo)

    mysql_query(“INSERT INTO users (user_name,score,category_id)VALUES (‘$name’,0,’$category’)”) or die(mysql_error());

    Reply
  4. Jacque -  January 30, 2014 - 2:25 pm

    Hi can we download file directly ? thanks.

    Reply
    • muni -  January 30, 2014 - 5:43 pm

      Hi Jac,

      Sorry I had restricted the direct download, only subscribed users will get download to their mail id after they subscribed the blog successfully..

      Many Thanks,

      muni

      Reply
  5. Siyanat -  February 12, 2014 - 1:46 pm

    Hi,
    The demo looks great , I have subscribed but still not getting any download link :(

    Reply
    • muni -  February 12, 2014 - 4:39 pm

      Hi Siyanat,

      Thank you, will get u only after 4 hours….

      Reply
      • Siyanat -  February 12, 2014 - 5:19 pm

        Thanks Muni , will be waiting :)

        Reply
  6. michael lupolover -  March 4, 2014 - 8:15 pm

    We are a bunch of volunteers and opening a braand new scheme in our community.
    Your website provided us with helpful information to work on.
    You have done an impressive job and our entire group shall be grateful to you.

    Reply
  7. ahmer -  March 14, 2014 - 8:02 am

    Hi Muni,
    Great work…
    How do i make a timer for each question. So once time is up. It moves to the next question

    Reply
    • Jihed -  March 18, 2014 - 2:38 pm

      That’s what I’m looking for, anyone find a solution post it please!

      Reply
  8. mehmet -  March 27, 2014 - 5:54 pm

    Do you have to do this to me?

    Reply
    • muni -  March 28, 2014 - 12:59 am

      Hi Mehet,

      Yes Sure…

      Many Thanks,
      muni

      Reply
  9. abul hasan -  April 12, 2014 - 9:07 am

    Hi Munni,

    Superb Work…

    I have subscribed. But still i didn’t get download link….

    Thanks…

    Reply
  10. Thriz -  May 6, 2014 - 11:36 am

    Your tutorial is excellent but i have just one problem with it is that a user is only allowed to take one question if user starts a new quiz it does not reflect in the db and the same user can’t log in again….how do i slove this to make a user take multiple test and make those tests scores reflect in the db

    Reply
  11. Dipo -  May 7, 2014 - 12:07 am

    Please i requested for some download and i got nothing it’s more than 24 hours now pls refer to this problem thanks

    Reply

Leave A Comment

Your email address will not be published. Required fields are marked (required):

Related articles

Back to Top