View Full Version : how to delete session cart after insert into DB?

11-28-2007, 03:38 AM
halo there..i have some problem here..i have store the cart into a session array...after that, when user checkout, i need to insert each cart into the database table..

if localCart( CARTPID, i )<> "" THEN
set rsInsert = Server.CreateObject("ADODB.Recordset")
sqlInsert = sqlInsert & " (CustomerMasterID,TotalAmount,DiscountAmount,DiscountPercentage,OrderNumber,OrderPrefix,Remarks,Stat usOrder,DateCreated,DateModified,CreatedBy,ModifiedBy)"
sqlInsert = sqlInsert & " VALUES (" & 1 & ", " & newprice & ",'"& ringgit &"', '"& percent &"',"& 1000 &",'aaaa','bbbb','N','"&Now()&"','"&Now()&"','0','0')"
response.Write sqlInsert
objconn.execute sqlInsert

end if

my problem is...how can i delete the session cart after i insert into db?
i think i cant use the session.abandon..since got the userlogin session id..if i use the session abandon, it will kill all the session..how can i do it? plz help..plz help.....urgent..plz help..thank you very much.

11-28-2007, 09:14 AM
hi there..i have solved it..thanx all!