求助:ASP实现购物车 用session实现
<%session("id")=request.QueryString("id")&session("id") '从上个页面中获取ID值存放到session("id")中
set conn=server.CreateObject("adodb.connection")
c
conn.open connstr
set rs=server.CreateObject("adodb.recordset")
sql="select*from titles where title_id='"&session("id")&"'"
rs.open sql,conn,1,1
'response.Write(rs.recordcount) 连接数据库
%>
<center><p><h2>购物内容</h2></p></center>
<table width="800" border="1" align="center">
<tr align="center">
<td>编号</td>
<td>书籍名称</td>
<td>单价</td>
</tr>
<%for i=1 to rs.recordcount%> '循环输出
<tr>
<td><%=rs.fields(0).value%></td>
<td><%=rs.fields(1).value%></td>
<td><%=rs.fields(4).value%></td>
</tr>
<%
rs.movenext
next
%>
</table>
<center><p><a href="bookshow.asp">返回</a></p><center>
实现不了 思路错了吗?