I have the following code where I'm having problems comparing the value that a user entered "upass" with that
retrieved from a database (RS('Password')) (which was assigned to pw for my ease of following).
When I run this ASP page, I find my problem is lying somewhere with the line
If I omit the quotes the condition does everything after the
if I put in quotes what upass should be (forcing it to be equivalent to pw), then I receive the correct results. If I omit the quotes to have
then everything after the
is excuted.
What am I doing wrong?
Thanks.
retrieved from a database (RS('Password')) (which was assigned to pw for my ease of following).
Code:
<% uname=Request.Form("uname") %>
<% upass=Request.Form("upass") %>
<%
CON=Server.CreateObject("ADODB.Connection")
CON.Open("DSN=verify;")
SQL = "SELECT Password FROM mainpwl"
RS = CON.execute(SQL)
pw = (RS('Password'))
if (pw == "upass")
{
Response.Redirect("granted.htm");
}
else
When I run this ASP page, I find my problem is lying somewhere with the line
Code:
if (pw == "upass")
Code:
else
Code:
if (pw == upass)
Code:
else
What am I doing wrong?
Thanks.