Forum Moderators: coopster

Message Too Old, No Replies

Back Navigation Required in online quiz

Back Navigation Required in online quiz

         

kapiljain

5:25 am on Feb 23, 2006 (gmt 0)

10+ Year Member



Dear All,

I have quiz online in which question come 1 by 1 as per categories selected by user.

What i need is to provide back navigation facility to users because this is dyamic page and user clicks on back button page gets expired. So i need to put one back button on quiz page so that user can navigate one pointer back from current question.

My Quiz Logic:
First of All Topics comes in topic.php from database user selects topic depending on which sql executes and i fetch all questions than it moves to quiz_new.php page where all fetched questions finally inserted in temp table with one manually generated varaiable series 1,2,3,4,5 from $j variable within insertion loop using $j++; so if user selected 5 question to opt from various topics so it will be fetched from master table and inserted into temp table so that i can track all users in future. Finally 1 question will be displayed on page than user clicks on next button (in footer.php) so he'll be moved to quiz_next.php where i used logic that i update attempt flag = 1 and finally i select all such question order by series which user user has not attempted so in a manner user will get all unattempted questions in sequence. I tried to put back navigation facilty in page quiz_next.php but cannot succeed because i need page to be posted every time so that query will get executed and all hidden variable will work properly the current logic for back navigation is working till some level but my hidden controls cannot be filled as i am calling it thru hyperlink and sending querystring in it. So atleast page can be posted on back button and finally i can trace that it is back button clicked so i can check that this back query should work or not.

[edited by: jatar_k at 6:41 pm (utc) on Feb. 23, 2006]
[edit reason] removed code dump [/edit]

jatar_k

6:51 pm on Feb 23, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I see a couple of options here

you could tag your user with a cookie or use a sesison. Give them an id that relates to your temp or master table (I don't quite get the setup). You could store all your hidden vars in the cookie or session and then use that to rebuild the page.

That way you could just use a normal link in the page to go back

you could also write a query string on your link that has all the required information to rebuild the previous page.

kapiljain

10:09 am on Feb 24, 2006 (gmt 0)

10+ Year Member



Thank you sir but this time you replied late but i have already achived the things thanks for help again
Please co-operate in next issues.

Kapil.