Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how to delete session cart after insert into DB?

    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..

    Code:
    
    if localCart( CARTPID, i )<> "" THEN
    set rsInsert = Server.CreateObject("ADODB.Recordset")
    sqlInsert = "INSERT INTO TBL_ORDERMASTER"
    sqlInsert = sqlInsert & " (CustomerMasterID,TotalAmount,DiscountAmount,DiscountPercentage,OrderNumber,OrderPrefix,Remarks,StatusOrder,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.
    Last edited by cloudy; 11-28-2007 at 03:54 AM.

  • #2
    New Coder
    Join Date
    May 2007
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi there..i have solved it..thanx all!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •