51Testing软件测试论坛
标题:
紧急请教?post提交的问题
[打印本页]
作者:
葡萄1988
时间:
2008-7-15 16:20
标题:
紧急请教?post提交的问题
<html>
<head>
<title> New Document </title>
<script language="JavaScript">
<!--
function move(src, dest){
var index = src.selectedIndex;
if(index < 0) return;
var op = src.options[index];
var newOp = new Option(op.innerText, op.value);
dest.options.add(newOp);
src.remove(index);
}
//-->
</script>
<body>
<div align="center">
<form method="post" action="3.php">
<select name="left" size="20" MULTIPLE width=200 style="width: 200px" >
<?php
if (mysql_connect('127.0.0.1','root','root')){
mysql_query("set names GBK;");
$query = "select * from oa.fieldinfo where tablename = " . $_POST['sign'] . "'"; 从数据库中读取数据
if ($result=@mysql_query($query)){
$i=0;
while($rows=@mysql_fetch_array($result))
{
$temp=$rows[fieldname] . " as \"" . $rows[fieldcaption] . "\"";
echo "<option value='$temp'>$rows[fieldcaption]</option>";
$rows_result[$i][0]=$rows[fielename];
$i++;
}
$num=$i-1;
mysql_free_result($result);
} else echo "执行SQL语句($query)失败:".mysql_error();
} else echo '数据库连接失败!';
?>
</select>
<select name="right" size="20" MULTIPLE width=200 style="width: 200px" >
</select>
<br></br><br>
<input type="submit" name="cmd" value="提交查询">
</br>
</form>
</div>
</body>
</html>
请问如何在下页中得到右列表框的值?
我这里有:
UC/OS和UCLinux比较
资料
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2