<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<form name="form1" method="post" action="tjzbt.php">
<table width="243" border="1" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center">
<select name="select" id="select">
<?php
include("../class/conn.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>
<tr>
<td width="65">子标题</td>
<td width="178"><label>
<input type="text" name="zbt" id="zbt">
</label></td>
</tr>
<tr>
<td colspan="2">完成的进度
<label>
<input type="text" name="num" id="num" size="15">
%</label></td>
</tr>
<tr>
<td colspan="2" align="center"><label>
<input type="submit" name="button" id="button" value="提交">
</label></td>
</tr>
</table>
</form>
</body>
</html>
我想根据列表菜单里显示的值,把这个值所对应的ID的值,传递给另外一个页面,该怎么写
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<form name="form1" method="post" action="tjzbt.php">
<table width="243" border="1" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center">
<select name="select" id="select">
<?php
include("../class/conn.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>
<tr>
<td width="65">子标题</td>
<td width="178"><label>
<input type="text" name="zbt" id="zbt">
</label></td>
</tr>
<tr>
<td colspan="2">完成的进度
<label>
<input type="text" name="num" id="num" size="15">
%</label></td>
</tr>
<tr>
<td colspan="2" align="center"><label>
<input type="submit" name="button" id="button" value="提交">
</label></td>
</tr>
</table>
</form>
</body>
</html>
我想根据列表菜单里显示的值,把这个值所对应的ID的值,传递给另外一个页面,该怎么写
若要多个name="select[]"
$_POST['select']为数组
$value=$_POST['select'];
//$value就是你要的ID