Save scores to SQL database?

  • xiphrex


    I am not a PHP developer and Im struggling to do this.

    Is there a way to save the quiz scores with the name of the quiz and an IP address to a database?

  • Joe B.
    Joe B.

    You could do this pretty easily by doing the save when it serves up the results page. The only problem is that there is no session ID or login associated with the person taking the quiz. All they would need is the firefox extension called tamper data to change their score to whatever they want and it would be stored in your database.. which is probably not what you want.

    To make it so that they can't change their score, you'd need to add a session id that gets passed back and is used to store the visitor's score in a database table, eliminating the score variable that is passed in POST. That is a bunch of work, however…