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
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    login- only 3 attempts?

    hello

    i was just requiring some help on creating a web application, being a simple login that would give you 3 tries to login and then display a screen to saying you were locked out, and if succesful displays a screen with a form on it.

    just wondering if i could get some help on this.

    thankyou

    joey

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,036
    Thanks
    2
    Thanked 316 Times in 308 Posts
    You cannot do this with javascrpt (the forum section where you posted your question) because it can be bypassed when done in javascript.

    You must use a server side scripting language and keep the attempt count in a database of some kind (mysql, flat-file,...) Note: You cannot use a session to hold the attempt count because you can get a new session and a new set of attempts by simply dropping the session id and starting a new session.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,333
    Thanks
    11
    Thanked 587 Times in 568 Posts
    with just javascript, you could allow one try or infinite tries, but not a specific number.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%


  •  

    Posting Permissions

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