请教关于php付选框处理和写库处理方法
请教关于php付选框处理和写库处理方法这是我的投票页
<?php require_once('conn.php'); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<?php
$sql="select * from voteclass where active=1";
$conn=mysql_query($sql,$connec);
$rs=mysql_fetch_array($conn);
?>
<form id="form1" name="form1" method="post" action="vote_save.php">
<table width="400" border="1" align="center" cellpadding="3" cellspacing="3">
<tr>
<td colspan="2"><?= $rs["vc_name"]?></td>
</tr>
<?php
$i=1;
$sql1="select * from votexiang where vc_id='".$rs["vc_id"]."' order by vx_id desc";
$conn1=mysql_query($sql1,$connec);
while($rs1=mysql_fetch_array($conn1)){
?>
<tr>
<td width="58"><label>
<?php
if($rs["class"]=="单选")
{
?>
<input type="radio" name="votexiang" value="<?=$rs1["votexiang"]?>">
<?php }else{?>
<input type="checkbox" name="votexiang<?=$i?>" value="<?=$rs1["votexiang"]?>">
<?php
}
?>
</label></td>
<td width="315"><?=$rs1["votexiang"]?></td>
</tr>
<?php
$i++;
}
?>
<tr>
<td><label>
<input type="submit" name="Submit" value="提交" />
</label></td>
<td><a href="look_vote.php?vc_id=<?=$rs["vc_id"]?>">查看投票结果</a></td>
</tr>
</table>
</form>
</body>
</html>
这是投票处理页只能处理单选按扭却不能处理付选框有那为大虾帮帮忙!~~~给出处理付选框的代码
<?php require_once('conn.php'); ?>
<?php
$votexiang=$_POST["votexiang"];
$sql="update votexiang set vx_shu=vx_shu+1 where votexiang='$votexiang'";
mysql_query($sql,$connec);
echo("<script type='text/javascript'> alert('投票成功!');location.href='vote.php';</script>");
?>