classic asp request form and variables

HAMZA

New Member
I need some help here. I got this simple username/password script to enable a login page. It is basically a form asking a username/password and comparing with some info inside the code.\[code\]If Request.Form("FormUsername") = "username" AND Request.Form("FormPassword") = "password" Then\[/code\]What I would like to do is compare user/pass info from some variable, like having a second file with the variables:\[code\]<%'Username VariablesDim PCUser, PCPassPCUser = "username"PCPass = "password"%>\[/code\]then include the file to the login page:\[code\]<!--#include file="Users.inc"-->\[/code\]And then be able to read the variables on the request.form: \[code\]If Request.Form("FormUsername") = "& PCUser &" AND Request.Form("FormPassword") = "& PCPass &" Then\[/code\]That's what I tried so far and didn't work :(Could anyone help me figure out why???If I do a response.write at the end of the page it will show me the variables values:\[code\]<%Response.Write("user= " & PCUser & "<br />")Response.Write("pass= " & PCPass & "<br />")%>\[/code\]thanks in advancePC
 
Back
Top