开发者

How to get group radio button Value using Code ingnitor in the controller

开发者 https://www.devze.com 2023-02-02 13:03 出处:网络
I have two radio button <input tabindex=\"3\" type=\"radio\" name=\"gender\" id=\"gender\" value=\"M\">Male&nbsp;<input tabindex=\"4\" type=\"radio\" name=\"gender\" id=\"gender\" value

I have two radio button

<input tabindex="3" type="radio" name="gender" id="gender" value="M">Male&nbsp;<input tabindex="4" type="radio" name="gender" id="gender" value="F">Female

How to get group radio button Value using Code ingnitor

$this-&开发者_运维问答gt;input->post("gender");

I want to retrieve selected radio button value as "M" or "F" In the controller side.


<input tabindex="3" type="radio" name="gender[]" id="gender" value="M">Male
<input tabindex="4" type="radio" name="gender[]" id="gender" value="F">Female

$this->input->post('gender')

Thanks Sanil

0

精彩评论

暂无评论...
验证码 换一张
取 消