<% 'if session("cookieid") <> session.SessionID or session("payproc") & "X" = "X" Then 'response.redirect("nocookie.htm") 'else Dim myrefid myrefid = session("refid") if myrefid & "X" = "X" or myrefid = "got_it" then myrefid = "SYKARO" 'Janet's user id...lol, don't ask :-)) end if Dim error error = 0 ' Insert your most excellent database code here to capture sale and credit the referrer connectionstring = "clb" Set cn = Server.CreateObject("ADODB.Connection") On error resume next cn.Open connectionstring if err <> 0 then cn.Close error = 1 else Set member = Server.CreateObject("ADODB.Recordset") member.ActiveConnection = cn sqltext = "select * from members where userid = '" & myrefid & "'" On error resume next member.open sqltext if err <> 0 or member.EOF then sponsor = "SYKARO" member.Close refcom = 98.50 sqltext = "update members set eComEarned = eComEarned + " & refcom & " where userid = '" & myrefid & "'" On error resume next member.open sqltext ' we remove the user id session object so someone cannot get credited twice for the same sale if the back button is pressed session.contents.remove("refid") session.contents.remove("payproc") session.Abandon ' direct the buyer to the thank you page and give them a link to download the ecourse response.redirect("clb_thnks.asp?ref=" & myrefid) end if 'end if %>