xia0yin Posted March 17, 2013 Share Posted March 17, 2013 hey, uhhm i'm new to php and also a student, we have this final project given by our teacher, he did gave us this as the should be outcome of our project link: http://sir-ice.herobo.com/Register.php i'm not asking you to give me the codes for the whole project (but will be glad if you do so lol) but i just want to ask, how come that there are several pages with same filename? the "questions.php" appeared many times but different content.,.any answer will greatly be appreciated..my grades depends on it hahathanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/275765-cant-seem-to-figure-this-out/ Share on other sites More sharing options...
KevinM1 Posted March 17, 2013 Share Posted March 17, 2013 I think it's funny that I answered all 10 questions correctly, yet it tells me I got 9/10 right. He likely just saves the answers as session variables on each submission. From what I can see, he randomizes the order the questions are asked, but maps them to a particular question number behind the scenes. Look at the HTML questions.php generates: notice the hidden form element? And how every question in it begins with "^question number"? That's how he keeps track of what question has what answer. It's not the most elegant solution, but it works. Quote Link to comment https://forums.phpfreaks.com/topic/275765-cant-seem-to-figure-this-out/#findComment-1419120 Share on other sites More sharing options...
xia0yin Posted March 17, 2013 Author Share Posted March 17, 2013 Thanks for answering! ,.at least now i have the idea of what am i supposed to do haha you're a great help sir.. Thanks again Quote Link to comment https://forums.phpfreaks.com/topic/275765-cant-seem-to-figure-this-out/#findComment-1419212 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.