Validation codes

PythonPython Forum LeaderThe Royal RAM
Id like a very simple form which shows an image of 5 numbers. These then need to be entered in exactly into a form box to allow it to continue...

The numbers need to change each time and must be random.

Any tutorials anywhere on this?

Thanks

The Royal Ram

Comments

  • ChroderChroder Senior Member The Royal RAM
    I blogged about this a while ago, that might be useful. The example there is quite messy, but it seems to work ;)

    Basically, you use sessions or cookies to store a validation code. Then you use the same validation code in your image (creating images with PHP is easy as pie). Once they submit the form, check the session/cookie validation code (the "real" one) against what the user inputted into the form.
Sign In or Register to comment.