Billybonga
IS-IT--Management
Hi all,
I've scratching my head trying to figure this out and hope you can help.
I have voting script that displays the question in a file vote.asp?ID=X where X is the question from that database record. These records are processed in cast.asp?ID=X
I have a few things going on in this file
1) Input data to database and then progress (redirect) to next question so
2) if the ANSWER ID is 44 then redirect to a certain question
3) and this is where I'm simi stuck - If the question is the last QUESTION in the database then redirect to a thank you.
Now I can do this manually by
This works, but since I have an administration section when you can add extra questions question 9 won't alway be the last question/record in the database and I'd perfer not to manually edit the file each time I add a new question.
Can anyone explain how I can determine if a questionID is the last record in the database?
Thanks for you help
Billybong
I've scratching my head trying to figure this out and hope you can help.
I have voting script that displays the question in a file vote.asp?ID=X where X is the question from that database record. These records are processed in cast.asp?ID=X
I have a few things going on in this file
1) Input data to database and then progress (redirect) to next question so
Code:
Response.Redirect "vote.asp?ID="&questionID+1
2) if the ANSWER ID is 44 then redirect to a certain question
Code:
if answerID = 44 then
Response.Redirect "vote.asp?ID=3"
response.end
end if
3) and this is where I'm simi stuck - If the question is the last QUESTION in the database then redirect to a thank you.
Now I can do this manually by
Code:
if questionID = 9 then
Response.Redirect "thankyou.asp"
This works, but since I have an administration section when you can add extra questions question 9 won't alway be the last question/record in the database and I'd perfer not to manually edit the file each time I add a new question.
Can anyone explain how I can determine if a questionID is the last record in the database?
Thanks for you help
Billybong