欢迎光临
我们一直在努力

select 传值问题-PHP教程,其它文章

建站超值云服务器,限时71元/月

<? 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的值

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » select 传值问题-PHP教程,其它文章
分享到: 更多 (0)

相关推荐

  • 暂无文章