Forums

This topic is locked

newb ie form redirect question

Posted 25 Feb 2003 18:37:49
1
has voted
25 Feb 2003 18:37:49 kelly lerbekmo posted:
hey - i think this should be easy to answer...hopefully. I've created a form that incorporates two radio buttons - the viewer fills out the form and selects radio button A, submits the form and it (needs to) take you to page A, the viewer fills out the form and selects button B, it takes you to page B. Right now, it doesn't matter which button is selected, it takes you to one page...make sense? How do I 'insert record' and make the buttons meaningful as in, depending on which one is selected, it'll take you to the right page?thanks for any help!
kelly

Belly

Replies

Replied 10 Mar 2003 10:41:37
10 Mar 2003 10:41:37 Q Qwerty replied:
I'm not really an expert on this, but the following might provide you with a solution.

On the page where you have the radiobuttons, make sure it passes the selected parameter based on the selected radiobutton. Let's say Button "A" passes the following parameter: yourpage?option=a

Now, create a second page where you are going to use the case statement like:

<%
Dim whichoption
whichoption = Request.Querystring("option"
Select Case whichoption
Case = "a"
%>
<!-- #include file="page_a.asp" -->
<% Case = "b" %>
<!-- #include file="page_b.asp" -->
<% End Select %>

Make sure you have two include files called page_a.asp and page_b.asp where you put the specified information depending on the button that was chosen.

I hope this provides you with an answer.

Good luck!


Reply to this topic