Jump to content

create new dir or use DB


mickym25

Recommended Posts

hi guys,

I have a question regarding site design. I am making a site for a teacher friend of mine which requires being able

to create/display quizs on different topics. At the moment I am using a flash quiz template which uses an xml file to store its questions,etc which i will imbed in a php file. the quiz template is about 100kb.

 

Anyway, im just wondering which way i should go about creating/storing new quizzes,

e.g. use one page with a database to get the specifics on the quiz, e.g. quiz.php?topic=math

 

or create a new directory for each quiz, copying the quiz template into each, e.g www.mysite.com/subjects/math/

 

just wondering about performance,scalability,etc,

 

any suggestions/help much appreciated!

Link to comment
Share on other sites

I would use a database layout like this:

 

quizzes

quiz_id - int(10), primary key, auto incrementing

name - varchar(100)

(description - text)

 

questions

question_id - int(10), primary key, auto incrementing

quiz_id - int(10), index

answer_id - int(10)

text - varchar(100)

 

answers

answer_id - int(10), primary key, auto incrementing

question_id - int(10), index

text - varchar(100)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.