我在html表和表单中有一个单选按钮。当单选按钮的值为文本时,按钮返回零。但是当值为数字时,按钮返回rue值。代码如下。
<form method="POST" action='insert_per.php'>
<table >
<thead>
<tr>
<th class="center"><strong>Name</strong></th>
<th class="center"><strong>Email</strong></th>
<?PHP if($_SESSION['user_group'] == 63){
echo '<th class="center"><strong>System Admin</strong></th>';
echo '<th class="center"><strong>Admin</strong></th>';
echo '<th class="center"><strong>User</strong></th>';
}
</tr>
</thead>
<?php
if($stmt->execute()){
// output data of each row
while($rows = $stmt->fetch(PDO::FETCH_ASSOC)){ ?>
<tr>
<td border="0" type="hidden" style="display:none;"><input type="hidden" name="hidden" value=<?php echo $rows['member_id']; ?></td>
<td class="center"><?php echo $rows['username']; ?></td>
<td class="center"><?php echo $rows['email']; ?></td>
<td class="center"><input type="radio" name="gp" value=11></input></td>
<td class="center"><button name="submit" type="submit">submit</button></td>
</tr>
<?php
}
}
?>
</table>
</form>
&#13;
然而,当单选按钮的值从11变为例如文本时,单选按钮会发布11的副词。 &#34;欢迎&#34;表格后期值为零&#34; 0&#34;从单选按钮
答案 0 :(得分:0)
始终将<title>Yelken Otel Rezervasyon Kontrol Sistemi</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script type="text/javascript"> ...
放在引号之间。
请务必关闭HTML代码,此value="something"
代码未关闭。
input