<%if request("do")= "del" Then Set MyCmd1 = Server.CreateObject("ADODB.Command") MyCmd1.ActiveConnection = MyConn MyCmd1.CommandText = "UPDATE Forces_Items SET Deleted = 'yes' WHERE ItemID = ? " MyCmd1.Parameters.Append MyCmd1.CreateParameter("", 3, 1, , request("id")) Set RSDel = Server.CreateObject("ADODB.RecordSet") RSDel.Open MyCmd1 response.redirect "my-items.asp" end if %>

BUYING

MY ITEMS FOR SALE

<%GetItems = "SELECT * FROM Forces_Items WHERE Deleted = 'no' AND Paid = 'yes' AND AccountID = '"&session("AccountID")&"' AND DATEADD(Day, ListingDuration, EntryDate) > Convert(datetime,'"&now()&"',103) " SET RSItems = MyConn.execute(GetItems) if RSItems.EOF then%>

Sorry! You have no items for sale.

<%else Do WHILE NOT RSItems.EOF%>

<%=RSItems("Title")%>

£<%=RSItems("Price")%>   " onclick="if(!confirm('Are you sure you want to delete this record? It will be removed permanently!')) return false;">   ">

<%if RSItems("Thumb1") <> "" then sayimg = RSItems("Thumb1") else sayimg = "nophoto.jpg" end if%>

Description :
<%=RSItems("Description")%>

<%RSItems.Movenext Loop end if%>