How can I know if the radio button checked property is true in PHP, can anyone give me an example?
Thanks..
After submitting your form, in $_POST (or $_GET respectively) you'll have a key with your radio button name and value with your radio button value, if it was checked. Otherwise, there will be no such key at all.
So <input type="radio" name="test" value="checked!" checked="checked" />
Will produce $_POST['test'] == 'checked!'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With