title: Classic ASP nested if else condition not executing
body: <p>Its a simple login form that I have made using Classic ASP, where the user and the admin can login using the same form.</p>
  
  <p>In the "Users" table in database I have created a field called "status" with DATA TYPE as BIT(i.e "0" or "1") value is accepted. By default value is "0" for every new registered user.</p>
  
  <p>I have passed a query where if the status is "0" that particular User or Admin should be redirected to Authentication.asp page where he'll answer some questions and onclick of SUBMIT the status value in the database will be set to "1".
  "1" indicates that user or admin has filled the authentication form and can be redirected to his desired page rather then redirecting him to Authentication.asp page.
  For that I have used If-elseif-else statement. I rechecked it many times it doesn't seem that there is any thing missing with my if-else statements. But I'm always redirected to authentication page even if I manually entered "1" as the status in the status column in database. here's my code.</p>
  
  <pre><code>Session("Username")=request.form("user_name")
      if request.Form("sub_but") &lt;&gt; "" then
      sql = "SELECT * FROM Users WHERE UserName='"&amp;request.form("user_name")&amp;"' AND Password='"&amp;request.form("pwd")&amp;"'"
      rs.open sql, con, 1, 2  
      if rs.EOF then
              response.Write("&lt;script language='javascript'&gt;{attention_emp();}&lt;/script&gt;")
          else
          if(rs("status")=1 &amp; rs("login_type")="admin") then
                    Response.Redirect ("admin.asp")
          elseif(rs("status")=1 &amp; rs("login_type")="emp") then
                        response.Redirect("leave.asp")
          else
                        response.Redirect("auth.asp") 
          end if  
      end if
  
      rs.close
      end if 
  </code></pre>