Oops. I was trying to stay close to Stan's example. The "hidStr"
hidden input is unnecessary in my example.

On Dec 12, 12:48 pm, "Aaron J. White" <[email protected]> wrote:
> You could use Stan's example (which is good by the way) or you could
> just store the captcha answer in a session variable. This is what I
> have done before with success, but using the hash is a better option
> instead of having an anonymous session. Note: get_rand_str is a custom
> function that creates a random str of a specific length.
> <cfset human = false >
> <cfif StructKeyExists(FORM,"accesscode")>
>  <cfif form.accesscode EQ session.captcha.answer>
>   <cfset human = true >
>  </cfif>
> </cfif>
>  <cfif human EQ false>
>   <cfset session.captcha.answer = application.utility.get_rand_str(6)
>
>   <cfoutput>
>   <form action="#CGI.SCRIPT_NAME#" method="post">
>    <cfcaptcha width="200" height="40" border="1"
> displaystring="#session.captcha.answer#" />
>    <input type="hidden" name="hidStr" value="#hash(str)#" />
>    <br />
>     Access Code:
>    <br />
>    <input type="text" name="accesscode" value="" size="20"
> maxlength="20" />
>    <input type="submit" name="submit" value="Submit" />
>   </form>
>   </cfoutput>
> <cfelse>
> <cfset session.auth  = true>
> <cflocation url="/admin/index.cfm" >
> <cfif>
>
> On Dec 11, 11:01 am, Stan Winchester <[email protected]> wrote:
>
>
>
>
>
>
>
> > Glad it helps!
> > I appreciate all the work you guys do to make OpenBD available!
>
> > On Sun, Dec 11, 2011 at 9:53 AM, Alan Williamson <[email protected]> wrote:
> > > Thanks Stan, I will update manual
>
> > > --
> > > online documentation:http://openbd.org/manual/
> > > google+ hints/tips:https://plus.google.com/115990347459711259462
> > >http://groups.google.com/group/openbd?hl=en

-- 
online documentation: http://openbd.org/manual/
   google+ hints/tips: https://plus.google.com/115990347459711259462
     http://groups.google.com/group/openbd?hl=en

Reply via email to