I've the following code for the two radio buttons but it isn't working i don't know why :S
If 'On' is selected it displays 'ON is selected' and so on but it isn't working :S
and i want one button to be selected at a time but when i run this code i am able to select both the button.
what is the problem
<form method="post" action="<?php echo $PHP_SELF;?>">
Family Filter:
<input type="radio" name="button1" value="On" /> On
<input type="radio" name="button2" value="Off" /> Off
</form>
<?php
if (isset($_POST['button1'])) //&& $_POST['button1'] == 'On')
{
echo "ON is Selected.";
}
else if (isset($_POST['button2'])) //&& $_POST['button2'] == 'Off')
echo "Off is selected";
?>