2011-01-22 19:58
采纳率: 100%
浏览 40


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 get 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.

图片转代码服务由CSDN问答提供 功能建议

我有一个表格正由PHP更新到MySQL数据库。 我有两个单选按钮:

 &lt; input type =“radio”name =“show_on_website”value =“Y”/&gt; 是
&lt; input type =“radio”name =“show_on_website”value =“N”/&gt; 否

点击单选按钮并提交表单后,值为Y或 N,取决于所选择的不会被提交到MySQL数据库中。 表单中的所有其他数据都是正常更新,而不是单选按钮。 我在提交表单时使用 $ show_on_website = $ POST ['show_on_website'];

我错过了什么或做错了什么? 感谢您提供的任何帮助。

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douhui2307 2011-01-22 20:01

    use $_POST instead of $POST

    打赏 评论

相关推荐 更多相似问题