请教在提交表单前如何将option中的value值传递到sql语句中?谢谢大家!
<!doctypehtml><html><head><metacharset="utf-8"><title>无标题文档</title></head><body><sele...
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<select id="lcxg" name="lcxg" class="lcxg" >
<option value="169">一号教学楼</option>
<option value="170">二号教学楼</option>
<option value="171">三号教学楼</option>
</select>
<?php
$sql = "select * from 表名 where id = 'value ?'";
?>
</body>
</html> 展开
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<select id="lcxg" name="lcxg" class="lcxg" >
<option value="169">一号教学楼</option>
<option value="170">二号教学楼</option>
<option value="171">三号教学楼</option>
</select>
<?php
$sql = "select * from 表名 where id = 'value ?'";
?>
</body>
</html> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询