Forum de discussion
Forum « Programmation ASP » (archives)
Re: Login authentification
Envoyé: 25 février 2005, 13h19 par Salem
<%
email = request.form("email")
pword = request.form("pword")
'ouverture de la connexion
set cx = server.createobject("adodb.connection")
cx.open "ta chaine de connexion"
'ouverture du recordset
set rs = server.createobject("adodb.recordset")
rs.open "select * from ta_table where email = '" & email & "'", cx
erreur = ""
if rs.eof then
erreur = "utilisateur inconnu"
else
if rs("pword") <> pword then erreur = "password incorrect"
end if
rs.close: cx.close
if erreur = "" then
response.redirect("ma page.aspx")
else
response.write(erreur)
end if
%>
Réponses
|