<% if(session("login")<>"yes") then response.redirect("login.asp?URLFIRE=purchasehistory.asp") end if %> <% set rso = con.execute("select *from purchase where orderid in(select orderid from orders where username='" & session("curuser") & "')") %>
Purchase History
Code
Product
Qty.
Amount
<% totamt=0 do while not rso.eof %>
<%=rso("pcode")%>
<%=rso("pname")%>
<%=rso("qty")%>
$<%=rso("price")%>
<% totamt = totamt + rso("price") rso.moveNext loop %>
Total :- $<%=totamt%>