为何表单中的select的值传不过来?
l_kk 2002-04-17 10:32:29 在main.php程序中有如下代码:
<form name="form1" method="post" action="delete.php">
<p>删除新闻
<select name="select">
<?
while(OCIFetchInto($stmt, &$result)&&$result[0]!='') {
echo "<option value='.$result[0].'>".$result[0]."</option>";
}
?>
</select>
<input type="submit" name="Submit" value="提交">
</p>
在delete.php中的代码如下:
<? $conn = OCILogon("system", "manager", "");//连接数据库
if (!$conn) {
echo "<h1>ERROR - 连接数据库失败</h1>";
exit;
}
//读取记录
$sql="select flag from newstype where type_name='$select' ";
$stmt = ociparse($conn,$sql);//分析sql语句
if (!$stmt){
echo "<h1> error count not parse sql statment!</h1>";
exit;
}
ociexecute($stmt);//执行
ocifetchinto($stmt,&$result);
echo $result;
exit;?>
请问为何没有返回值?