Php Can';无法获取单选按钮的值

Php Can';无法获取单选按钮的值,php,forms,Php,Forms,我正在构建一个表单,将数据发布到MySQL数据库,我已经完成了所有工作,但是每当我测试它时,在数据库中,只有一部分中单选按钮的值都显示为0。 因此,这个例子显示了表单中所填内容的正确值 <div class="indented"> Stronger? <input type="radio" name="q4a" value="1" id="q4aY" /> <label for="q4aY"&g

我正在构建一个表单,将数据发布到MySQL数据库,我已经完成了所有工作,但是每当我测试它时,在数据库中,只有一部分中单选按钮的值都显示为0。 因此,这个例子显示了表单中所填内容的正确值

<div class="indented">
            Stronger?
            <input type="radio" name="q4a" value="1" id="q4aY" />
            <label for="q4aY"><span></span>Yes/ </label>
            <input type="radio" name="q4a" value="0" id="q4aN" />
            <label for="q4aN"><span></span>No</label><br />
            More likely to succeed?
            <input type="radio" name="q4b" value="1" id="q4bY" />
            <label for="q4bY"><span></span>Yes/ </label>
            <input type="radio" name="q4b" value="0" id="q4bN" />
            <label for="q4bN"><span></span>No</label><br />
            More known/visible/recognized?
            <input type="radio" name="q4c" value="1" id="q4cY" />
            <label for="q4cY"><span></span>Yes/ </label>
            <input type="radio" name="q4c" value="0" id="q4cN" />
            <label for="q4cN"><span></span>No</label><br />
            <br />
</div>

更强
是的/
否
更有可能成功? 是的/ 否
更知名/可见/认可? 是的/ 否

但不管怎样,每次填完都会返回为零

<table id="section2Table">
            <thead>
                <tr>
                    <th scope="colgroup" colspan="4">Before ELP</th>
                    <th scope="col">Activities that support Entrepreneurship</th>
                    <th scope="colgroup" colspan="4">Now</th>
                </tr>
                <tr>
                    <th>Yearly</th>
                    <th>Quarterly</th>
                    <th>Monthly</th>
                    <th>Weekly</th>
                    <th></th>
                    <th>Yearly</th>
                    <th>Quarterly</th>
                    <th>Monthly</th>
                    <th>Weekly</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><input type="radio" name="7_1b" value="1" id="1yearlyb" />
                    <label for="1yearlyb"><div align="center"></div></label></td>
                    <td><input type="radio" name="7_1b" value="4" id="1quarterlyb" />
                    <label for="1quarterlyb"><div align="center"></div></label></td>
                    <td><input type="radio" name="7_1b" value="12" id="1montlyb" />
                    <label for="1montlyb"><div align="center"></div></label></td>
                    <td><input type="radio" name="7_1b" value="52" id="1weeklyb" />
                    <label for="1weeklyb"><div align="center"></div></label></td>
                    <td class="q7question">Strategically lead others as a member of an advisory board or board of directors (company or NGO, including JA, chamber)</td>
                    <td><input type="radio" name="7_1n" value="1" id="1yearlyn" />
                    <label for="1yearlyn"><div align="center"><span id="check"></span></div></label></td>
                    <td><input type="radio" name="7_1n" value="4" id="1quarterlyn" />
                    <label for="1quarterlyn"><div align="center"><span id="check"></span></div></label></td>
                    <td><input type="radio" name="7_1n" value="12" id="1montlyn" />
                    <label for="1montlyn"><div align="center"><span id="check"></span></div></label></td>
                    <td><input type="radio" name="7_1n" value="52" id="1weeklyn" />
                    <label for="1weeklyn"><div align="center"><span id="check"></span></div></label></td>
                </tr>

在ELP之前
支持创业的活动
现在
每年
每季的
月刊
周报
每年
每季的
月刊
周报
作为咨询委员会或董事会(公司或非政府组织,包括JA、商会)的成员,战略性地领导他人
我不确定我在这里遗漏了什么,发布页面上的PHP代码都是一样的,如果你想看一看,我会发布它,但是所有变量都是以同样的方式标识的。我很想在这方面得到一些帮助,因为我对这东西还很陌生。
谢谢

属性值不是按钮的当前状态

相反,如果选中,它是单选按钮的值

示例:如果选择了单选按钮,并且定义的值为“是”,则在php中,您将收到“是”,但如果未选择,您将不会收到任何内容。

在整个页面中运行HTML。你会发现相当多的错误。其中一项是(其中不止一项):

属性“ID”的值无效:“1”无法启动名称
^
125:属性Y的值无效:X无法开始名称

您可能违反了此属性的命名约定。例如,id和name属性必须以 字母,不是数字

此外,在
标签
s内似乎有
div
,该标签也被指出为无效。我建议您修复HTML中的语法错误,然后重试

我不知道这是否能解决您的问题,但遵守标准从来都不是一个坏主意


这里是一个不错的地方,你可以尝试一下,设置有问题的情况,并让我们进行调试。

请发布:)请发布你正在使用的相关PHP。除非我有误解-你是说应该选择单选按钮。OP表示选择了单选按钮-“每次填写”+1此。如果排除了其他错误,则更容易查明问题的实际原因。
value of attribute "ID" invalid: "1" cannot start a name 
    <input type="radio" id="1yearlyb" value="1" name="7_1b">
                            ^