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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<%
'Récupère mes données saisi par l'utilisateur
id_user = Request.Form("txtPersonne")
nom_user = Request.Form("TxtMedecin")
'connexion à la base de donnée
dbPath = Server.MapPath("base/mabase.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};"&" DBQ="&dbPath
if (Isnumeric(id_user))=true then
sql = "Select * FROM matable WHERE id_pers=" & id_user & "
else
sql = "SELECT * FROM matable Where nom="& id_user & " OR Email='" & id_user & "'"
end if
Set RS = server.createobject("ADODB.Recordset")
RS.Open sql,Conn , 3, 3
'On affiche le résultat dans un tableau%>
<table>
<%
do while not RS.eof
%>
<tr>
<td>#</td>
<td><%=RS("id")%></td>
</tr>
<tr>
<td>Prénom</td>
<td><%=RS("Prenom")%></td>
</tr>
<tr>
<td>Nom </td>
<td><%=RS("Nom")%></td>
</tr>
<tr>
<td>Email </td>
<td><%=RS("Email")%></td>
</tr>
<tr>
<td>Date Naissance</td>
<td><%=RS("Date")%></td>
</tr>
<%
RS.movenext
loop
RS.close
%>
</table> |