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).

Note : You can refer my latest Quiz application
 
Responsive PHP Quiz Script

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

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.

 

 

Step 2:

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

<script src="js/countdown.js"></script>

<div id='timer'>
            <script type="application/javascript">
            var myCountdownTest = new Countdown({
                                    time: 60, 
                                    width:200, 
                                    height:80, 
                                    rangeHi:"minute"
                                    });
           </script>

        </div>

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

setTimeout(function() {
             $("form").submit();
          }, 60000);

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.

 <script type="application/javascript">
            var myCountdownTest = new Countdown({
                                    time: 60*5, 
                                    width:200, 
                                    height:80, 
                                    rangeHi:"minute"
                                    });
           </script>
setTimeout(function() {
             $("form").submit();
          }, 60000*5);

 

 

Note : All premium users can able download all the scripts without any waiting time. So become premium user.    

If you want any of my script need to be customied according to your bussiness rquirment,

Please feel free to contact me [at] muni@smarttutorials.net

Note: But it will be charged based on your customiation requirement

Get Hottest Updates, Scripts & Other Useful Resources to your Email

  • Lawson

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

  • http://www.bdwebservices.com Azizu

    Hi,
    How Can I show 5 Questions each page?

  • Joe Koder

    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());

  • Jacque

    Hi can we download file directly ? thanks.

  • muni

    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

  • Siyanat

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

  • muni

    Hi Siyanat,

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

  • Siyanat

    Thanks Muni , will be waiting :)

  • http://www.youtube.com/watch?v=mGhQ2RVDZGM michael lupolover

    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.

  • ahmer

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

  • Jihed

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

  • http://testcozsene.net mehmet

    Do you have to do this to me?

  • muni

    Hi Mehet,

    Yes Sure…

    Many Thanks,
    muni

  • abul hasan

    Hi Munni,

    Superb Work…

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

    Thanks…

  • Thriz

    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

  • Dipo

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

  • Mehran

    Yes, it is correct. I had the same issue.

  • pravin

    After Click on submit (kiss me), nothing happen, let me know whats the issue, tried it online also

Get Instant Script Download Access!