Hi guys,
I have text field, 2 radio button (subscribe & unsubscribe) in html file. Now if the user select subscribe radio button I want to run subscribe.php and if select unsubscribe radio button I want to run unsubscribe.php….
How can I do it?
Thanks in advance Jack
You can use javascript to change the form action i.e. document.forms['myForm'].action = "" Or you could just submit it to the same page and use php to test which radio button is checked.[/QUOTE]
if($_POST['radio1'] == "value1") { // do something here } else if ($_POST['radio2'] == "value2") { // do something else }[/QUOTE]
Help @jack001 spread the word by sharing this article on Twitter...