以下程序想要实现 country 中的operator显示,我制作了一也页面显示所有的country , 然后
我点页面中的china转到下面这个页面,可为什么没有任何显示呢?
数据库如下;
=================
id country operator
1 china CMCC
2 india airtel
==================
<!--#include file="conn.asp"-->
<html >
<head></head>
<%
dim rs
dim sql
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select operator from info where country='"&request("country")&"'"
rs.open sql,conn,1,1
%>
<body><table width="200" border="1">
<% do while not rs.eof %>
<tr>
<td> <%=rs("Operator")%> </td>
</tr>
<% rs.movenext
loop
rs.close
conn.close
%>
</table>
<p> </p>
</body>
</html>
有没有取到值
按道理就是不一定喽,调试看看,如果没取到值,就检查下SQL语句。
2、你是怎么跳转到上边的页面的,post?还是 get xxx.asp?country=china?
然后通过点country链接到显示operator,没有get和post