codice:
<%
user=request.form("p_user")
user=replace(user,"'",""")
password=request.form("p_password")
password=replace(password,"'","""")
MySQL="Select * from utenti Where id_user = '" & user & "'"
Set MyRs=MyConn.Execute(MySQL)
if rs.EOF then
errore="1"
Rs.close
Set Rs= Nothing
MyConn.Close
set MyConn=nothing
response.redirect "errore.asp?err="&errore
end if
rpass=trim(rs("password1"))
if password <> rpass then
errore="2"
response.redirect "errore.asp?err="&errore
else
'quello che vuoi fare
end if
%>
Errore.asp
codice:
<% errore= request("err")
if errore = "1" then
errore= "Username Errato o Inesistente"
end if
if errore= "2" then
errore= "Password Errata"
end if
%>
<%=errore%>