form based questions pulled from database - input requested

Associate
Joined
18 Oct 2002
Posts
858
Location
Cheshire
ok, a little project...
basically, theirs unlimited number of catagories and each catagory has it's own set of questions...

Each catagory can have 1 to XXX number of questions...

They way I thaught of doing it is the you have a table for catagories....
a table for the questions with the catagory ID and each individual question has it's own row...
Given that some questions could be txt box, yes / no etc I going for another table fror answer type and each question dictates it's answer type...

So, the way I thaught of recording the answers is, in one table that records the user ID, catagory ID and question ID and have each answer as seperate rows...

Firstly, is this the best way of doing it?
Secondly, whats the best way of getting a unknown number on answers from a form post and putting them into a database?

Any help appreciated...
 
Back
Top Bottom