help with statements
 
Post new topic   Reply to topic    Hawkee.com Forum Index -> PHP Scripting
 
whirlwind  -  Sat Oct 09, 2004 1:57 pm Reply with quote
ok i have a quiz script that i have half written. I have written the page with the actual questions on... which is here

http://whirlwind.hollosite.com/quiz/help.txt

(but obviously in a php file)

and i am wondering how to write the answers.php page that has the outputs... ie question 1 you said cheese the answer was bread you were wrong... etc

anyone knows how to do this?

whirlwind
tye  -  Sat Oct 09, 2004 5:53 pm Reply with quote
The best way I see to do this would be to create an answer and question script with a common configuration file.

Here is an example:

Common file (both included by answer and question scripts). This will have the questions and answers. Example:

Code

 


The question file will use a loop to print out each question:

Code

 


The answer file will also use the array to check the answers:

Code

 
whirlwind  -  Sun Oct 10, 2004 3:21 am Reply with quote
ermm ok thats damn confusing... is there any way to write the answer file with if-statements???
Display posts from previous:   
Post new topic   Reply to topic    Hawkee.com Forum Index -> PHP Scripting All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.