could someone please help me..
im tryin to allow someone to login and even if they enter the correct name and password on a previous form, they stll get direected to choose.asp in the "if".... why can anyone tell me??? its prob something simple but i ant seeing it..
<%
'Dimension variables
Dim connection 'Holds the Database Connection Object
Dim check 'Holds the recordset for the records in the database
Dim data 'Holds the SQL query for the database
Dim totalCost
Dim quantity
Dim cost
Dim arrtime
Dim destination
Dim deptime
Dim leaving
Dim flightID
Dim total
Set connection = Server.CreateObject("ADODB.Connection")
Call connection.Open ("log")
check = "SELECT name, password FROM log WHERE name = '"_
& Request ( "name") & "'" _
& " AND password = '"_
& Request ( "password") & "'"
Set data = Server.CreateObject("ADODB.Recordset")
Call data.Open (check , connection)
If data.EOF Then
data.Close()
connection.Close()
Response.Redirect("choose.asp")
Else
data.Close()
connection.Close()
Response.Redirect("loginWelcome.asp")
end if
%>
im tryin to allow someone to login and even if they enter the correct name and password on a previous form, they stll get direected to choose.asp in the "if".... why can anyone tell me??? its prob something simple but i ant seeing it..
<%
'Dimension variables
Dim connection 'Holds the Database Connection Object
Dim check 'Holds the recordset for the records in the database
Dim data 'Holds the SQL query for the database
Dim totalCost
Dim quantity
Dim cost
Dim arrtime
Dim destination
Dim deptime
Dim leaving
Dim flightID
Dim total
Set connection = Server.CreateObject("ADODB.Connection")
Call connection.Open ("log")
check = "SELECT name, password FROM log WHERE name = '"_
& Request ( "name") & "'" _
& " AND password = '"_
& Request ( "password") & "'"
Set data = Server.CreateObject("ADODB.Recordset")
Call data.Open (check , connection)
If data.EOF Then
data.Close()
connection.Close()
Response.Redirect("choose.asp")
Else
data.Close()
connection.Close()
Response.Redirect("loginWelcome.asp")
end if
%>