How to check the radio button checked?
Posted: Wed Sep 24, 2008 5:02 am
I have 7 radio button in my HTML form all of them named radiobutton and in the action page I want to know which button is clicked and for that I have written in the action.php as:
its not working plz help me with the necessary code.
Code: Select all
<?php
for($i=0;$i<7;$i++) {
if($_POST["radiobutton['$i']"])
echo $i + "no radio is pressed";
}
?>