|
-
root
Asp!!!!!
Code:
<% option explicit
DIM strLogin, strPass, strTest1, strTest2, strUser, strPw
strLogin = "Juxtaman"
strPass = "flashkit"
strUser = request.Form("user")
strPw = request.Form("pw")
if request.Form("submit") = "Login" then
if strUser = strLogin then
response.Write("True")
elseif strUser <> strLogin then
strTest1 = "Wrong Username"
elseif strUser = "" then
strTest = "You Must Enter something"
end if
If strPw = strPass then
response.Write("Ture")
elseif strPw <> strPass then
strTest2 = "Wrong Password"
elseif strPw = "" then
strTest = "You Must Enter something"
end if
end if
%>
How do i check to see if the user entered an wrong answer.
I want the script to test for both no entery, and wrong password.. as it is right now it's just saying wrong password.
My logic might be off a bit.
-
Re: Asp!!!!!
i'm not too sure but have you tried testing for no entry before the wrong entry? Because if your first check is if "" equals the username, it will think it is a wrong entry, not a blank one.
so, try this:
Code:
<% option explicit
DIM strLogin, strPass, strTest1, strTest2, strUser, strPw
strLogin = "Juxtaman"
strPass = "flashkit"
strUser = request.Form("user")
strPw = request.Form("pw")
if request.Form("submit") = "Login" then
if strUser = strLogin then
response.Write("True")
elseif strUser = "" then
strTest = "You Must Enter something"
elseif strUser <> strLogin then
strTest1 = "Wrong Username"
end if
If strPw = strPass then
response.Write("True")
elseif strPw = "" then
strTest = "You Must Enter something"
elseif strPw <> strPass then
strTest2 = "Wrong Password"
end if
end if
%>
jgo: pleased to meet you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|