【问题标题】:How do I get the radio button data with php [closed]如何使用 php 获取单选按钮数据 [关闭]
【发布时间】:2013-04-23 12:27:40
【问题描述】:
<input type="radio" id="radio1" name="radio"><label for="radio1">Section 1 </label>
<input type="radio" id="radio2" name="radio"><label for="radio2">Section 2 </label>
<input type="radio" id="radio3" name="radio"><label for="radio3">Section 3 </label>
<input type="radio" id="radio4" name="radio"><label for="radio4">Section 4 </label>
<input type="radio" id="radio5" name="radio"><label for="radio5">Section 5 </label>
if (radiobuttun == section1)
  {
  include ("file1.php")
  }
elseif (radiobuttun == section2)
  {
  include ("file2.php")
  }
  .
  .
  . -->

【问题讨论】:

  • 先生,这个问题已经在这个网站和其他地方被问过并回答了几十次。如果您更新您的问题以向我们展示您尝试过的内容以及尝试失败的地方,我们可能会针对您的情况提供具体指导。

标签: php radio-button


【解决方案1】:

假设表单是通过 POST 提交的,您要查找的变量是 $_POST["radio"]。

【讨论】:

    猜你喜欢
    • 2013-12-12
    • 1970-01-01
    • 2017-06-26
    • 1970-01-01
    • 1970-01-01
    • 2013-05-11
    • 1970-01-01
    • 2013-04-21
    • 2016-02-28
    相关资源
    最近更新 更多