Re: Store Quiz scores in session
| From: | John W. Holmes | Date: | Wed, 28 Apr 2004 16:33:25 +0000 |
| Subject: | Re: Store Quiz scores in session | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184894@lists.php.net to get a copy of this message | ||
From: "Pushpinder Singh" <pgarcha@adelphia.net>
> 1. Is it possible to vary session variables across multiple pages
Yes, that's kind of the whole point of sessions. You can increment the
session "question" counter on each page and then check at the end. Sounds
like a valid method to me.
> 2. Or it is better to use a Session Array that holds 10 entries (and
> then do the comparison)
Personal preference. Are you telling the user immediatly whether they are
right or wrong? Maybe you'll want to save all of the answers in the session
so you can tell then what they answered and what the correct answer should
have been?
---John Holmes...