PDA

View Full Version : Form, information on next page depends on what was entered



Jonobl
31 Jul 2009, 06:25 AM
Hello everybody. The easy part: I want to create a HTML form.

The hard part: When the user clicks submit I want the information on the next page to depend on what they entered on the form.

For example the form asks "Do you have a dog?" and the user click a radio button saying yes I want the next page to display information about dogs.


When the form asks "Do you have a cat?" and the user click a radio button saying yes I want the next page to also display information about cats.

But when form asks "Do you have sheep?" and the user click a radio button saying no I don't want the next page to display information about sheep.

Thanks in advance.

Lab860
02 Aug 2009, 11:20 PM
So you're looking for something like this, (not the actual code to use but the idea)
dim pagevar
if form1.text1.value ="cats"
then pagevar="this page is about cats"
else if form1.text1.value ="sheep"
then pagevar="this page is about sheep"
else if ...
...
end if
html
head
head
body
pagevar
body
html