打印

select 传值问题

select 传值问题

<? include("../include/opendb.php");
$sql="select username from user group by username order by id DESC";
$rs=Execute($sql);$row=NumRows($rs);
?>
<script>
function selectsubmit(form){
var username="<?echo $username;?>";
window.location="a_controlmag.php?active=up&mselt="+mselt+"&username="+username;
}
</script>
<body><form name="form" method="post" action="">
<table width="100%" border="1" align="center">
<tr><td width="10%">username</td><td width="30%">modify</td></tr>
<?while($row = FetchArray($rs)){?>
<tr><td><?=$row[username]?></td>
<?$sql1="select username from user where username = '$row[username]' ";
$rs1=Execute($sql1);$row1=NumRows($rs1);
?>
<td>
<input type="hidden" name="username" value="<?echo $row[username] ;?>">
<select name="mselt" id="select" onChange="selectsubmit(this.form);">
<option value="0" <?if($row1=="0"){echo "selected";}?>>closed</option>
<option value="1" <?if($row1=="1"){echo "selected";}?>>opened</option>
</select></td>
</tr><?}?></table></form></body>
请问点击选择框后如何得到mselt和username的值   

TOP

当前时区 GMT-4, 现在时间是 2009-1-9 19:01
ComePlay8.Com
Powered by Discuz! 6.0.0 © 2001-2007 Comsenz Inc.
Processed in 0.066755 second(s), 10 queries, Gzip enabled
TOP
清除 Cookies - 联系我们 - 来玩吧 - Archiver - WAP
Designed By Discuz! Support Team