i was wondering if anyone was able to help me with a login script.
i made one in asp.. here
log_no=Request.Form("username")
password=Request.Form("password")
sql="SELECT * FROM Login WHERE Log_No='" & log_no & "' AND userpass='" & password & "'"
set db=Server.CreateObject("ADODB.Connection")
db.Open "class"
set rs=Server.CreateObject("ADODB.RECORDSET")
rs.Open sql, db, 3, 3
If Rs.EOF Then
' Die Login-Informationen sind falsch.
response.Redirect("studentlognew.asp")
'Response.Write("login=failed")
Else
id = rs("ID")
session ("idnum") = rs("ID")
session("logged") = "true"
Session("username") = rs("Log_No")
If rs("Admin") = True Then
session("Admin") = "true"
'Response.Write("login=admin")
response.Redirect("adminlogin.asp")
else
session("Admin") = "false"
End if
If rs("Coach") = True Then
session("Coach") = "true"
'Response.Write("login=coach")
response.Redirect("coachlogin.asp")
else
session("Coach") = "false"
End if
End If
rs.Close
set rs=nothing
db.Close
set db=nothing
i want to make the same sort of thing in php.
anyone able to help.