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
https://forums.phpfreaks.com/topic/116923-create-new-dir-or-use-db/
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)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.