Send radio box value with $_POST

前端 未结 6 1776
鱼传尺愫
鱼传尺愫 2021-01-19 11:10

How can I send a radio or checkbox value to the $_POST array even when the field is empty?

\';
            


        
6条回答
  •  执笔经年
    2021-01-19 12:09

    Try this it will work :

    Unchecked radio elements are not submitted as they are not considered as successful. So you have to check if they are sent using the isset or empty function.

    ';
            print_r($_POST);
            echo '
    '; } ?>
    Male

提交回复
热议问题