PDA

View Full Version : Working in radio button


simpson
03-11-2011, 02:45 PM
Hi Team

I am new to this forum... and new to dreamweaver. I am expecting a lot of help from you all.

I want to link pages with condition to the radio buttons on submit Please help me.

Corrosive
03-11-2011, 06:29 PM
Hi simpson and welcome to the forum

Could you be a little clearer please? Are you saying you want to send a visitor to a specific page based on their input with radio buttons? I.e. they answer a question with a radio button option, press submit and then they are taken to the next page?

simpson
03-12-2011, 02:38 PM
Yes the same. When they select for eg Yes and click on submit button they have to be redirected to another page...

Corrosive
03-13-2011, 09:24 AM
If you are using PHP then you need to look at 'if/else' statements and then use the 'header' command with a location to redirect the user based on their choice. Read these two pages to get the idea; http://www.tizag.com/phpT/ifelse.php & http://www.w3schools.com/php/func_http_header.asp

Hope that helps.

simpson
03-13-2011, 10:40 AM
Thanks but can we do the same in html

Corrosive
03-13-2011, 10:49 AM
You could probably do it client side using javascript but think you'll need some kind of scripting to process the results of the form submit and selection chosen. Issue with javascript is that it can be switched off by the user so I'd strongly suggest you go down the php route. Unless anyone else has any bright ideas?