<% dim Conn Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Driver={MySQL};DATABASE=consultdb; UID=consult;PASSWORD=jemima64" ' could get user id by matching the session ID .... 'SQL="SELECT * FROM Users WHERE sessionID='" & Session.SessionID & "'" 'set RS=Conn.Execute(SQL) ' ... but just rely on Session("User") SQL="UPDATE Users SET sessionID=0 WHERE userName='" & Session("User") & "'" Conn.Execute(SQL) Session("User")="" Conn.Close Response.Redirect "loginok.asp?type=0" %>