GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 31-Jan-2007, 08:05
markyp markyp is offline
New Member
 
Join Date: Nov 2006
Posts: 26
markyp is on a distinguished road
Exclamation

Create a multiple choice testing system


Hi I am new to this and have a project where by I need to create a multiple choice testing system usingPHP and MySQL.

Can anyone give me any pointers and are there any recommendation for installing a web server?
  #2  
Old 01-Feb-2007, 00:09
crystalattice's Avatar
crystalattice crystalattice is offline
Flame War Instigator
 
Join Date: Apr 2004
Location: San Diego
Posts: 1,534
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: Create a multiple choice testing system


What OS are you running? If it's *nix based, then Apache should already be installed. If it's Windows, then probably the easiest thing is to install WAMP.

Beyond that, it's mostly a matter of creating the database and filling it with your questions, then writing the PHP code to pull the questions out and print them. You'll probably want to look at www.php.net for tutorials or consider getting a book. You might also find some web sites that have specific information regarding this type of project. You could also check out www.hotscripts.com.

Once you get some code started, we can give you more specific help.
__________________
Common Sense v2.0-Striving to make the world a little bit smarter.
  #3  
Old 01-Feb-2007, 05:01
markyp markyp is offline
New Member
 
Join Date: Nov 2006
Posts: 26
markyp is on a distinguished road

Re: Create a multiple choice testing system


I am using windows and have installed the wamp server. I shall be doing a presentation on my work at university and was wondering if work could be accessed there that was done at home?

I'll check out the tutorials asap cheers
  #4  
Old 01-Feb-2007, 20:37
crystalattice's Avatar
crystalattice crystalattice is offline
Flame War Instigator
 
Join Date: Apr 2004
Location: San Diego
Posts: 1,534
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: Create a multiple choice testing system


You mean like set up a home web server you could access at work or vice versa? Sure. There's a couple ways you can do it. You can either get yourself a domain name and point your server to the associated IP address, that way all you have to do is type in the domain name to get to your server. Or you can try the DNS options at the end of this article.
__________________
Common Sense v2.0-Striving to make the world a little bit smarter.
  #5  
Old 06-Feb-2007, 13:31
markyp markyp is offline
New Member
 
Join Date: Nov 2006
Posts: 26
markyp is on a distinguished road

Re: Create a multiple choice testing system


do you know if there is a guide available anywhere for the wampserver? Not sure of how I can access the database etc.

thanks
  #6  
Old 06-Feb-2007, 20:21
crystalattice's Avatar
crystalattice crystalattice is offline
Flame War Instigator
 
Join Date: Apr 2004
Location: San Diego
Posts: 1,534
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: Create a multiple choice testing system


Since WAMP is just a conglomeration of separate software, you'd need to read up on each technology separately, e.g. MySQL, PHP, Apache, PHPMyAdmin, etc.

You can either get the documentation from each of their websites (usually not too difficult to figure out) or get a book. I'd recommend one of the books that combines the different products, like Beginning PHP5, Apache, and MySQL Web Development. That way you have everything you need in one book and you don't have to have multiple windows open, cluttering up your screen.

If you want an "ebook", I'd recommend trying http://shop.ebrary.com. You can make an account for $5 but you can use it like an online library; they have a good selection of computer books ranging from programming to web design.
__________________
Common Sense v2.0-Striving to make the world a little bit smarter.
  #7  
Old 05-Mar-2007, 07:40
markyp markyp is offline
New Member
 
Join Date: Nov 2006
Posts: 26
markyp is on a distinguished road

Re: Create a multiple choice testing system


i've doen the DB in the php area of the wamp. An out some code in the local host which makes several pages appear, do i need code to connect the db and the code connect?
  #8  
Old 05-Mar-2007, 21:38
crystalattice's Avatar
crystalattice crystalattice is offline
Flame War Instigator
 
Join Date: Apr 2004
Location: San Diego
Posts: 1,534
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: Create a multiple choice testing system


Yes, you'll have to use SQL statements to pull the information from the DB and then display them. PHP will be able to do this all directly; just look for examples of how to use MySQL with PHP.
__________________
Common Sense v2.0-Striving to make the world a little bit smarter.
  #9  
Old 07-Mar-2007, 11:08
markyp markyp is offline
New Member
 
Join Date: Nov 2006
Posts: 26
markyp is on a distinguished road

Re: Create a multiple choice testing system


I'm doing my DB now and have structured the questions and aswers in the db as follows,
(question)
Qid - eg question1
Cid - eg chapter 1
Question - eg what is lfc stadium
Answer1 - anfield
Answer2 - main road
Answer3 - the del
Answer4 - highbury
Answer5 - the den
CorrectAns 0 anfield

---
(answer)
ansID
name
q1
q2
q3
q4
q5
q6
etc

Does this look like i'm going along the right lines?
  #10  
Old 07-Mar-2007, 14:50
crystalattice's Avatar
crystalattice crystalattice is offline
Flame War Instigator
 
Join Date: Apr 2004
Location: San Diego
Posts: 1,534
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: Create a multiple choice testing system


I haven't messed w/ DB structure in a while so I can't say for certain. There are several ways to make it work.

Personally, I would make a table for questions, with each field being a necessary part of the question: questionID, chapterID, question, etc. Then I'd have a table for each set of answers, where the table would be "tied" to a particular question with a key value, such as questionID. There would be a separate boolean field for marking the correct answer, which the PHP code could then poll.

Alternatively, you could just make a huge table of answers, with each one put into a category. If you could identify the category of each question, you could then dynamically pull out 4 answers randomly from the answer list that matched the same category. The fifth answer could be manually added to the question so you know that the correct answer is available.

Or you can take your approach and tie everything together within a table, with a separate one made for each question. Though that will probably be a lot of work as the questions build up. You'll probably want something that is more automated, e.g. a table of questions and a table of answers.

So, I'd say you are taking the right approach. You just need to sit down and decide what way to structure the DB best. That's the hardest part of making a DB and one where having a book devoted to MySQL or DB design would come in handy.
__________________
Common Sense v2.0-Striving to make the world a little bit smarter.
 
 

Recent GIDBlogLast Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me just get started Mike Gustafson C Programming Language 1 21-Sep-2006 20:37
how to make my program get started along with the windows startup rangamma Java Forum 0 26-Apr-2006 02:41
getting started 1234321 Web Design Forum 1 26-Apr-2005 05:12
Using C++ for gfx (was Need help to get started.) Nick C++ Forum 3 21-Mar-2005 03:18
Our very special offers started!! abc5net Web Hosting Advertisements & Offers 0 15-Jul-2003 11:24

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:59.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.