一个关于asp的小问题,急救啊

来源:百度知道 编辑:UC知道 时间:2024/05/11 21:16:19
<!--#include file="connview.asp"-->
<%pid=request("pid")%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#000000" text="#000000">
<%
set rs= server.createObject("adodb.recordSet")
******************************************************************
rs.open "select * from vvvv where phid="&pid&"",connstr,1,1
******************************************************************
w=rs("phwidth")
h=rs("phheight")
phn=rs("photo")
rs.close
set rs=nothing
if w>=h then
dw=700
dh=int((dw*h)/w)
elseif w<h then
dh=500
dw=int((dh*w)/h)
elseif w<=700 then
dw=w
dh=int((dw*h)/w)
end if
%>
<

rs.open "select * from vvvv where phid="&pid&"",connstr,1,1
改为
rs.open "select * from vvvv where pid="&pid&"",connstr,1,1

很明显你的ID没有传过来..
在你提交的页面你增加一个隐藏域吧!如下
<input type="hidden" name="pid" value="<%=request.querystring("pid")%>">
不行再Q我

pid没有过来
你应该在
rs.open "select * from vvvv where phid="&pid&"",connstr,1,1
前面加:判断pid的值