<?php
include("../class/conn.php");
$cid=$_POST['slt'];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>项目管理系统</title>
</head><body>
<form name="form1" method="post" action="admin-glxm.php">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
<select name="slt" id="slt">
<?php
$db=db_connect();
$sql="select * from `title`";
$rs=$db->query($sql);
while($row=mysqli_fetch_array($rs))
{
?>
<option value="<?=$row[id]?>"><?=$row[title]?></option>
<?
}
?>
</select>
</td>
</tr>
<?
$bid=$cid;
$db=db_connect();
$sql="select * from `s_title` where t_id='$bid'";
$rs=$db->query($sql);
while($row=mysqli_fetch_array($rs))
{
?>
<td><?=$row[s_title]?></td>
</tr>
<?
}
?>
</table>
</form>
</body>
</html>我怎么获取不了<select name="slt" id="slt">的值
<?
include("../class/conn.php");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>项目管理系统</title>
</head><body>
<form name="form1" method="post" action="admin-glxm.php">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
<select name="slt" id="slt">
<?php
$db=db_connect();
$sql="select * from `title`";
$rs=$db->query($sql);
while($row=mysqli_fetch_array($rs))
{
?>
<option value="<?=$row[id]?>"><?=$row[title]?></option>
<?
}
?>
</select>
</td>
</tr>
<?
$bid='<script>document.write(document.getElementById(\'slt\').value)';
$sql="select * from `s_title` where t_id='$bid'";
$rs=$db->query($sql);
while($row=mysqli_fetch_array($rs))
{
?>
<td><?=$row[s_title]?></td>
</tr>
<?
}
?>
</table>
</form>
</body>
</html>
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\xmglxt\admin\2.php on line 34