A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Asp!!!!!

  1. #1
    root juxtaman's Avatar
    Join Date
    Aug 2002
    Location
    /dev/null
    Posts
    870

    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.

  2. #2
    Senior Member
    Join Date
    Mar 2002
    Location
    UK
    Posts
    208

    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center