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 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    preventing multiple clicks ?

    On my website ive got a html page in which a visitor can fill in his/her email adress, when submitted a cgi script will send the visitor an email with a newsletter.

    Is there anyway to prevent that the visitor fills in multiple email adresses ?
    My cgi script validates the email adresses, but the visitor can click the back button change a letter within the email adress and click the submit button again. any ideas will be welcome

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    You could record the ip address for each submission in a database and disallow any further submissions from that ip address that are made within the next five to fifteen minutes. That should hopefully block multiple submits from the one person while allowing a second person who is agssigned the same ip address at a different time to submit.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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