开发者

Radio button not posting value to MySQL database

开发者 https://www.devze.com 2023-02-06 09:13 出处:网络
I have a form that is being updated by PHP to a MySQL database.I have two radio buttons: <input type=\"radio\" name=\"show_on_website\" value=\"Y\" /> Yes

I have a form that is being updated by PHP to a MySQL database. I have two radio buttons:

<input type="radio" name="show_on_website" value="Y" /> Yes
<input type="radio" name="show_on_website" value="N" /> No

Upon clicking on the Yes or No radio button and submitting the form, the value Y or N, depending on which is selected does not g开发者_如何学Goet submitted into the MySQL database. All other data within the form is updating fine, just not the radio buttons. I am using $show_on_website = $POST['show_on_website']; upon submitting the form.

What am I missing or doing wrong? Thanks for any help you may provided.


use $_POST instead of $POST

0

精彩评论

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

关注公众号