I have a form with several radio buttons and a PHP script that gets them via POST. The problem is one set of them doesn't pass the right value. I can't see the problem, been staring at it for hours.
The problematic button group is here:
<input type="radio" name="device-type" value="Desktop" tabindex="1" />Desktop
<input type="radio" name="device-type" value="Laptop" />Laptop
Same page, another set of buttons works:
<input type="radio" name="ack-reboot" value="Yes" tabindex="5" />Yes
<input type="radio" name="ack-reboot" value="No" />No
The PHP
// Get the form variables
$deviceType = $_POST['device-type'];
$ackReboot = $_POST['ack-reboot'];
For some reason $deviceType returns a value of "1" no matter what radio button is actually selected. $ackReboot works just fine and returns the string. The PHP snippet is at the top of the script with no other PHP code before it.