Welcome Guest, Not a member yet? Register   Sign In
Questionaires - Session db
#1

[eluser]nevsie[/eluser]
I know this is often discussed, and i have read many posts suggesting the method i intend to use if more than fine, but if anyone could point out any obvious no no's and or problems i would be grateful.
2 simple questions

1. Capture General user info (name, email, address, etc) and then complete a 35 question survey (answer a, b, c, d, etc). 5-8 steps maybe.
This data could approach the 4k limit so i am intending to use database sessions to store userdata. Now i assume this does not suffer the same size limitations or any other obvious complications?

2. is this generally "bad form" and should i be using my own temporary database table for this?

I'll continue to search and read up - but so far the above seems fine for a small scale single question setup. but opinions are appreciated.
And sorry, i know this is probably very much repeat questions.
#2

[eluser]WanWizard[/eluser]
1. database sessions are limited by the definition of the 'userdata' column in the session table. Make it as big as you wish (for example, TEXT = max 64kb).

2. don't know what you mean with 'temporary'. what is 'bad form'?
#3

[eluser]n0xie[/eluser]
Why not insert the data after each step. I assume you need to save the data somewhere? Just keep state (i.e. what step is the user currently on?) in your session and you wouldn't even need database sessions.

User enters the site, gets a session. User inserts user info, pushes next, data is inserted and returns an 'survey_id'. Add id to session, add 'step2' to the session. Repeat until finished. Once the whole survey is done, set a boolean (is_completed), so you can filter out half completed forms.
#4

[eluser]nevsie[/eluser]
"bad form" - not the best way to do something is the best description i can give.

First off, i apologise, i missed one key factor. The questionnaire is a scoring utility, which is then used to rate the entrant. The result pass or fail is then sent in an email to the website owner. Nothing is stored after completion, so in theory if i were to setup a table to store the questions and answers it would only be for the period of the questionnaire - hence not very different from sessions!

but thanks for your responses, and sorry i missed the above key point!




Theme © iAndrew 2016 - Forum software by © MyBB