LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 693|回复: 1

sql为什么不可以调用变量

[复制链接]
发表于 2003-4-4 20:31:53 | 显示全部楼层 |阅读模式
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>我的sql</title>
</head>
<body>

<form name="form1" method="post" action="data1.asp">
  <p> 姓名:
    <input name="text1" type="text" id="text1">
  </p>
  <p> 密码:
    <input name="text2" type="password" id="text2">
  </p>
  <p>
    <input type="submit" name="Submit" value="提交">
    <input type="reset" name="Submit2" value="取消">
  </p>
</form>
<%
dim b
dim c
b=request.form("text1")
c=request.form("text2")
response.Write b
response.Write c
%>
<%
set connect=server.createobject("adodb.connection")
connect.open "students","sa","lx586"
create table hsyxf88(name varchar(10),hs int(8))
'connect.execute("insert into student(id,pwd)values('"b"','"c"')")
connect.execute("insert into student(id,pwd)values(9999,8888)")
set n=connect.execute("select pwd from student where id like'9%'")
response.write n("pwd")
response.write"你的数据已加入"
%>


</body>
</html>
发表于 2003-4-5 04:04:37 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表