Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html dir="rtl">
- <head>
- </head>
- <body>
- <%
- ' Create a command object. This object serves to run our queries
- Set Cm = Server.CreateObject("ADODB.Connection")
- ' Specify the system DSN path
- Cm.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
- "Dbq=" & Server.MapPath("db\mydb.mdb") & ";" & _
- "Uid=admin;" & _
- "Pwd=;"
- ' Now it's time for the query. We need to check the user information
- ' against the table Users
- mySql = "SELECT * FROM users WHERE " & _
- "userName='" & Request.Form("userName") & "' AND " & _
- "pass='" & Request.Form("Password") & "' "
- ' Retrieve the results in a recordset object
- Set Rs = Cm.Execute(mySql)
- If Rs.EOF Then
- Session("userGood") =0
- Cm.close
- Response.Redirect ("Home.html")
- Else
- Session("userGood") = 1
- Session("userName") = Rs("userName")
- Cm.close
- Response.Redirect ("home.asp")
- End If
- Cm.close
- Set Cm = Nothing
- Set Rs = Nothing
- %>
- </a><br />
- <a href="Home.html">
- חזרה לתפריט ראשי
- </a>
- </body>
- </html>
Add Comment
Please, Sign In to add comment