View Full Version : quiz web redirection script

10-29-2004, 02:47 AM

The script i have coded sends a user to a unique page based on their input. The problem i have is that when the form is filled out and sent it does not send the user in the right place where it is coded to goto.

Im not sure why this is? I have attached my script, i think its to do with the answertext section.


10-29-2004, 06:39 AM
there are two things that i see wrong. the first thing that i see wrong, is that the variable score is a number, but you're comparing it to letters. that's problem number one. the second thing that i see, is that your if-then statements are improperly constructed.

if(score = ans[1],ans[4],ans[8])

that's not valid code there. i think that what you're trying to do, so you'll have to explain what it is you want.

10-29-2004, 10:31 AM
im trying to redirect the user depending on what answers they chose from the form. Theres 3,then 4 then 3 questions so about 30 odd different combinations to different website addresses i need to add in the if statement.
All i need to script to do is check what values are being picked if they are a certain 3 combinations such as A D H then they will get taken to adh.html and so on.
Im not sure like you said if i coded if properly. Im not sure how to fix it.