我正在构建一个将数据发布到 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>
我不确定我在这里缺少什么,发布页面上的 PHP 代码都是一样的,如果你想看一下,我会发布它,但所有变量都以相同的方式标识。我很想得到一些帮助,因为我对这些东西很陌生。谢谢!