I realise this is out on the edge, but does anyone know of a method to store the answers to, say, a multiple choice quiz in a database?
If a user logs in to a site - username and PW - could that login be used to save his/her answers discreetly to the database?
Not sure what you mean by "out on the edge" but storing data (quiz answers etc etc etc) is a very common task and is the general concept behind all database (dynamic) driven websites.
Basically, when a user logs in you store their userID in a session variable. You then givem them a html form with the quiz qustions. When they click the form's submit button, their answers are sent to a server side script which first validates and santises the form data before using sql commands via the server side language to store the sent form data in a database table(s) and link it to the userID.
It is your responsibility to die() if necessary….. - PHP Manual
By 'out on the edge' I meant very difficult to achieve, not wrong!
And by 'discreet' I meant saved such that one's answers were not made available to others.
|All times are GMT +1. The time now is 04:33 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.