<% Call dbOpen() strUser = replace(Request("chattNamn"), "'", "''") strPasw = replace(Request("chattPassword"), "'", "''") strSQL = "SELECT * FROM chattUser WHERE chattNamn = '"_ & strUser & "' AND chattPassword ='" & strPasw & "';" Set rs = minCon.execute (strSQL) if not rs.EOF then strSQL = "UPDATE chattUser SET dtelastSeeenOnline = #"% Now() &"# WHERE chattNamn ='" & strUser & "'" minCon.execute strSQL,,128 strSQL = "INSERT INTO chattMeddelande (avchattUser, chattText, skrivTid) VALUES ("_ & "'System', '" & strUser & " Steg in i chatten', '" & Now & "')" minCon.execute strSQL,,128 Session("Inloggad") = rs("chattID") Call dbClose() Response.Redirect "chatten.asp" else Call dbClose() Response.Redirect("error.htm") end if %>