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 maxvee8's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    185
    Thanks
    19
    Thanked 18 Times in 18 Posts

    Question Form on a timer that cant be submitted more than once within the hour .. HOW? help

    hey im creating an app that maybe open to abuse on a comment form, im wanting to restrict the number of times the form is submited within an hour to say 3 times by a user.


    any one know any thing about this sorta thing, any eamples , places to start, tutorials, code ... i just dont know where to start with a form like that

    regards max
    Last edited by maxvee8; 03-03-2008 at 02:44 AM.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,468
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    Use Google to search for: PHP cookie tutorial

    Use cookies. Set a cookie (time value). Redirect back
    and check the cookie to see if it's there (if it exists).
    If not, it means they have cookies disabled, so you will
    not accept the comment. If you see the cookie,
    then check the value and see if the time has elapsed.
    Check it each time they refresh or revisit the page.
    When it has elapsed, reset cookie value with a new time.

    Note, you can also set and check the same cookie(s) using
    Javascripting along with PHP, so you could dynamically display
    a running timer that shows the user how much longer they
    need to wait until the next allowable comment.

  • Users who have thanked mlseim for this post:

    maxvee8 (03-03-2008)

  • #3
    Regular Coder maxvee8's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    185
    Thanks
    19
    Thanked 18 Times in 18 Posts
    ok cool thanks aill have a look in to it good starting point , cause i had no idea what i was looking for ,lol


  •  

    Posting Permissions

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