Re: Questionary Development

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 28, 2005 10:08 am, ...helmut said:
> I have a form that contains 100 questions. To make it easier on the user,
> I
> will divide it into 5 sections (20 questions per section), then all the
> information will be written to a db. What is the best way to carry along
> through the pages the information that has already been submitted?
> Cookies?
> Writing to a DB after each section? Session Variables?

I would recommend using the DB first.

If you can't/won't do that, use sessions.

I would NOT recommend carrying all the variables along as INPUT
TYPE="HIDDEN" -- While that would "work" it makes it much harder to allow,
say, a user who got disconnected to complete the form later, or a user
whose session timed out because their boss walked in, or...

If you've stored their info in sessions, you will still lose it if their
session times out.

If it's in the DB, then they can complete the form whenever they have time.

100 questions is a lot of questions...

You might even allow them to answer different sections in different
orders, if there is a nice way to present them with some kind of grouping
that's less arbitrary than 1-20, 21-40, ...

'Course, if this is a timed test/exam or something, some of the above is
moot...  But a student trying to take an exam that gets disconnected? 
Better to log their session start/end in the DB and only "count" time
against them if it is contiguous, if you can.

> I read that writing to a database as i go along could be too much of a
> hazzle for the db, specially if I have multiple people filling out the
> form
> at the same time.

You're not gonna slam the database unless you have *LOTS* of people
filling out the form at the same time.

How many is *LOTS* depends on hardware, and you should test this with YOUR
hardware/network, but I suspect you are worrying over a non-issue on this.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux