Hi, I have a wierd problem. I have a basic login page, which submits to itself to verify against a database and redirects to a new page if the login is correct. I have written the same code before and this is the first time I have this problem. Here is the redirecting code :
<%if rs.EOF then
set rs=nothing
conn.Close
else
userid = rs.Fields("user_id".Value
session("Userid" = userid
set rs=nothing
conn.Close
Response.Redirect("select_trip.asp"
end if %>
It works fine when the user Input is wrong. But when the user Input is correct, instead of redirecting to "Select_trip.asp", I get a "Page Cannot be displayed" error with the same page name in the URL. When I refresh the page, it starts from the first.
I tried replacing the VBScript Redirecting wih Javascript
document.location.href = "select_trip.asp";
This also gives me the same "Page Cannot be displayed" error with "select_trip.asp" in URL, but works fine if I refresh it.
Does anyone know where I am going wrong ? Any help is greatly appreciated.
Thanks,
Shiva.
<%if rs.EOF then
set rs=nothing
conn.Close
else
userid = rs.Fields("user_id".Value
session("Userid" = userid
set rs=nothing
conn.Close
Response.Redirect("select_trip.asp"
end if %>
It works fine when the user Input is wrong. But when the user Input is correct, instead of redirecting to "Select_trip.asp", I get a "Page Cannot be displayed" error with the same page name in the URL. When I refresh the page, it starts from the first.
I tried replacing the VBScript Redirecting wih Javascript
document.location.href = "select_trip.asp";
This also gives me the same "Page Cannot be displayed" error with "select_trip.asp" in URL, but works fine if I refresh it.
Does anyone know where I am going wrong ? Any help is greatly appreciated.
Thanks,
Shiva.