I am posting a value from a radio button , its value is 1 , but when I echo var_dump($_POST) , then it shows as “on” instead of 1 . Please help. I need to get 1 instead of “on”.
<input type="radio" id = "item" value="<?php echo $ItemID[0]; ?>"
name="ItemID"><label for="ItemID"><?php echo $ItemIDName[0]; ?></label>
BROWSER GENERATED HTML
<input type="radio" id = "ITEMA"
value="1" name="ITEM"><label for="ITEMA">A</label>
<input type="radio" id = "ITEMB" value="2" checked="checked" name="ITEM" ><label for="ITEMB">B</label>
<input type="radio" id = "ITEMC" value="3" name="ITEM" >
<label for="ITEMC">C</label>
The default value for radio button is “on” ! Check your php code
$ItemID[0]if it’s really being set to 1 !