How could I validate a checkbox and radiobutton input using PHP? I wish to display a message if there's no selected value from checkbox or radiobutton. I tried this for my checkbox.
$check = $_POST["checkbox"];
if(empty($check))
{
echo "You need to select at least one from the checkboxes";
}
It doesn't work. Also, how could I do it with radiobutton?