keeping score

S

sam

i have a multi-page test with a linear story and decision points where
people must answer a question. what is the best way to keep their score
through out the test and present it to them at the end?

i can think of a few convoluted ways of doing this, but am looking for
the most simple and one with the fewest other software requirements.

sam
 
S

sam

Mark said:
So do you want the best, or the simplest? They are unlikely to be the
same.

sorry about that, i suppose the simplest. options would be appreciated
though.

sam
 
M

Mitja

sam said:
sorry about that, i suppose the simplest. options would be appreciated
though.


The simplest way out are probably cookies in combination with JavaScript.
You've got to know, however, that quite some people don't have JS (enabled).

A better way would be to use server-side scripting (perl/python/php/...).
 
S

sam

Mitja said:
The simplest way out are probably cookies in combination with JavaScript.
You've got to know, however, that quite some people don't have JS (enabled).

A better way would be to use server-side scripting (perl/python/php/...).
i'm all for using php, but if i could avoid using a database that would
be much more convenient.

sam
 
M

Mitja

sam said:
i'm all for using php, but if i could avoid using a database that
would be much more convenient.

Sure, no need to.

===
Question 3: What's 1+1?
<form ...>
<input type="radio" name="ans" value="1">2
<input type="radio" name="ans" value="2">11
<input type="radio" name="ans" value="3">1.1
<input type="radio" name="ans" value="4">Pi
<!--Score so far:--><input type="hidden" name="pointssofar" value="15">
</form>
===

When generating the page like the snippet above, include the real
score-so-far. When getting the answer, rate it and sum up the pointssofar's
value and the number of points user gets for his newest answer.
 
S

sam

Mitja said:
Sure, no need to.

===
Question 3: What's 1+1?
<form ...>
<input type="radio" name="ans" value="1">2
<input type="radio" name="ans" value="2">11
<input type="radio" name="ans" value="3">1.1
<input type="radio" name="ans" value="4">Pi
<!--Score so far:--><input type="hidden" name="pointssofar" value="15">
</form>
===

When generating the page like the snippet above, include the real
score-so-far. When getting the answer, rate it and sum up the pointssofar's
value and the number of points user gets for his newest answer.
ok i've worked on this a little bit now, and i can more clearly define
my needs. i have found several examples of simple quiz scripts that do
almost what i'm looking for. you're suggestion above is very similar, as
is the link below:

http://www.onaje.com/php/article.php4/39

the project i'm working on plays a video clip, or several video clips
(each on their own page) and then brings up one question. they answer
that and then more clips, and another question. i need to be able to
store their running score across several pages. there are 23 total
questions and probably about 100 pages in the "story". at each question
they find out if they were right or wrong.

thanks.

sam
 
S

sam

sam said:
ok i've worked on this a little bit now, and i can more clearly define
my needs. i have found several examples of simple quiz scripts that do
almost what i'm looking for. you're suggestion above is very similar, as
is the link below:

http://www.onaje.com/php/article.php4/39

the project i'm working on plays a video clip, or several video clips
(each on their own page) and then brings up one question. they answer
that and then more clips, and another question. i need to be able to
store their running score across several pages. there are 23 total
questions and probably about 100 pages in the "story". at each question
they find out if they were right or wrong.

thanks.

sam

i've actually figured this one out on my own now. i've discovered the
wonders of sessions in php, which can hold variables over many pages,
which is what i guess i needed.

sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top