SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    limiting form submissions to one per email

    greetings!

    i need to prevent (as far as possible) users from submitting a from with the same email address and therefore duplicating output.

    example: we are running competitions on a web page. entrants forward their details to us and we pick at random a winner from all the entrants.

    form output is a simple email sent to microsoft outlook.

    i have found that some users are submitting as many as ten entries. i have been asked to limit this to as few as possible.

    i am clearing the form fields on refresh which is a small deterrant but i need to know how to check whether a user has used this email address before.

    we are running ASP/JScript - any assistance would be much appreciated.
    Last edited by webmc; Sep 24, 2002 at 08:12.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cookies is probably your answer without having logins and registrations:

    http://www.sitepointforums.com/showt...threadid=77675

    G

  3. #3
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    done.

    in a very ingenious way, i will attempt to explain.

    since we use the same page for many competitions i generate a competition id, which is also the subject of the email, and an email address to which the competition is, sent in a query string.

    the cookie i use to check whether a competition has been entered uses the competition id as its name and the entrants email address as its value.

    therefore the cookie is regenerated for each new competition id.

    therefore to manage competitions i simply need to change the url from something like:

    http://www.tntmagazine.com/compo.asp?CompID=Asia&SentTO=asia1000

    to

    http://www.tntmagazine.com/compo.asp?CompID=Africa&SentTO=africa1000

    cool huh! well for a novice coder it definitely is!

    thanks for the help!

    m a r t i n

  4. #4
    SitePoint Zealot
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont see how that stops multiple attemps with with the same email address.

  5. #5
    SitePoint Zealot redeyes's Avatar
    Join Date
    Dec 2001
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you not just store the entries in a db table.. then run a check each time it is submitted?.. if the email already exists.. tell them


Bookmarks

Posting Permissions

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