Hi I’m hoping someone can help me. I’m basically making a quiz site and I’m having trouble writing the PHP part of the code. After each quiz I want to be able to give the user their results and also the average results of everyone who took that quiz. Can’t figure it out and I’m pretty sure it’s because I can’t figure out how to store the user submitted data in an external .txt file.
Any help would be greatly appreciated, thanks
is there a reason you want to use a flat file (.txt) or are you able to use an sql database? if you can use a sql database the you can insert the data per quiz and then use the sql to output the results adding them up with a while loop then use the number of rows ( count(mysql_num_rows()) if you are using mysql ) to divide the result