Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    302
    Thanks
    16
    Thanked 0 Times in 0 Posts

    A little help with mu logic

    I need a little help with my logic.

    What i am trying to do is - if the secuirty number is true then allow me to submit my form, but I want to hide the Please verfiy button.

    Here is what I have so far


    <input name="strCAPTCHA" type="text" id="strCAPTCHA" maxlength="8" /><input type="submit" name="Submit" value="Please Verify"></td>
    </tr>
    <%
    if Request.ServerVariables("REQUEST_METHOD") = "POST" then
    strCAPTCHA = Trim(Request.Form("strCAPTCHA"))
    if CheckCAPTCHA(strCAPTCHA) = true then
    %>
    <tr>
    <td height="37" colspan="2" align="center"><b style="color:#00CC00">
    Verified (<%=strCAPTCHA%>) <input name="Button1" type="submit" value="Send" style="height: 25px"></b></td>
    </tr>
    <%
    else
    %>
    <tr>
    <td height="37" colspan="2" align="center"><b style="color:#FF0000">Not
    Verified.<br />Please Retry.</b></td>
    </tr>
    <%
    end if
    end if
    %>
    Kind regards,
    Mike Hughes

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Something like this?

    Code:
    <%
    
    strRequestMethod = Request.ServerVariables("REQUEST_METHOD")
    
    if strRequestMethod <> "POST" then ' no form has been submitted. Draw a form.
    
    else	' they've submitted the form
    	
    	strCAPTCHA = Trim(Request.Form("strCAPTCHA"))
    
    	if CheckCAPTCHA(strCAPTCHA) = true then	' they've submitted a valid form
    
    	else	' they've submitted an invalid form
    
    	end if
    	
    end if
    %>

  • Users who have thanked Spudhead for this post:

    hughesmi (11-12-2007)

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    302
    Thanks
    16
    Thanked 0 Times in 0 Posts
    cheers dude.
    Kind regards,
    Mike Hughes


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •