1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
<%
dim cnn
dim rst
dim nmatricule
nmatricule = request.Form("txtmatricule")
matriculeok = nmatricule
Set cnn = Server.CreateObject("ADODB.Connection")
Set rst = Server.CreateObject("ADODB.Recordset")
cnn.Open "DSN=delibes"
' Construction de la chaîne SQL
strSQL = "SELECT * FROM [tblauthentification]"
' Filtre sur les valeurs fournies par le visiteur
strSQL = strSQL & " WHERE matricule='" & Request.Form("txtmatricule") & "'"
strSQL = strSQL & " AND [login]='" & Request.Form("txtlogin") & "'"
strSQL = strSQL & " AND [mdp]='" & Request.Form("txtmdp") & "'"
rst.Open strSQL, cnn
' A-t-on trouvé un adhérent ?
If rst.EOF Then
'si la personne ne s'est pas bien identifiée, uniquement le centre de la la page change.
response.Redirect ("authentificationCF4ESSAIS2.html")
Else
[b]Session("matriculeok") = rst("matricule")[/b]
response.Redirect (nmatricule) & ".asp"
End If
rst.Close
Set rst = Nothing
Set cnn = Nothing
%> |
Partager