|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Forms - Passing Info From Page to Page
I have created an online quiz to add some interactivity to a site.
There are around 20 questions, so I think that I should probably divide the questions into two pages. I don't need to record the results in a db. It's just for fun. However, I would like to be able to display the user's answers and the correct answers. How do I get the data from page 1 to page 3 (the results page)? Should I store the info in a sessionid? Should I pass it in a querystring? I've read about sql injection attacks so I'm reluctant to pass querystrings, but then there are downsides to using sessions too! |
|
#2
|
|||
|
|||
|
Did you think to post them through hidden tags?
<input type=hidden .... |
|
#3
|
|||
|
|||
|
perhaps you can help me out a bit more - I'm a little thick.
On page 1, I have <input type='radio' name='" & CurrentQuestion & "' value='" & oRS("Answer") & "'>" & oRS("Answer") and that submits to page 2 how do I get those same values to page 3, using hidden values? |
|
#4
|
|||
|
|||
|
On The first page:
<input type=hidden name="CurrQuestion" value="<%=Answer%> On The 2nd page: Answer = "" & Request.Form("CurrQuestion") However, for a better understanding of passing values between web pages, read the tutorial from the link below: http://www.learnasp.com/learn/hidden.asp |
|
#5
|
|||
|
|||
|
thanks, the link you sent explains everything! Glad that I don't have to use session info or querystrings.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Forms - Passing Info From Page to Page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|