www.webdeveloper.com
Results 1 to 10 of 10

Thread: Form Validation help

  1. #1
    Join Date
    Mar 2012
    Posts
    7

    Form Validation help

    We are getting a few spam emails in our forms. I was wondering if there is a code for the "Name" portion of the form to have to include a space. So no more single names, it would have to be First[space]Last.

    Or as an alternative, adding an image validation to the form.

    Thanks!

  2. #2
    Join Date
    Mar 2012
    Posts
    62
    The spams are logically can;t be avoid,

    because now a days, the human beings are posting a form ,rather than a robot

    so its best method, to get an ip address of the span poster and keep that ip address in block list of .htaccess

    so if spam poster come back to our form, he can;t able to view it

    Thanks
    masterwin

  3. #3
    Join Date
    Mar 2012
    Posts
    7
    follow up to that then, how do I grab their IP address?

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    18,921
    You might take a look at Akismet. It does a very good job on my blog.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Mar 2012
    Posts
    7
    what about putting in a password box this is a static password? So I tell those using the form "you need to use aardvark" in the password field. Then if the password does not match, the form gives an error. Obviously this password would not actually be anywhere on the site. :-)

  6. #6
    Join Date
    Mar 2012
    Posts
    62
    @mythic: if human doing the spam post, your idea will work?
    Last edited by masterwin; 06-20-2012 at 12:16 AM. Reason: name change

  7. #7
    Join Date
    Mar 2012
    Posts
    7
    I truly believe so. If you don't know the password is "aardvark" then the script will never allow you to submit. It will always come up an error. So unless the person wants to sit there and try passwords until they are blue in the face, they will just move on to an unprotected form.

    I've tested it out and my script looks to be correct and I have not had a spam submission is over 12 hours.

  8. #8
    Join Date
    Aug 2006
    Posts
    301
    you can also employ captcha or recaptcha or roll your own captcha like code, but i'd go with nog dogg and use akismet, i don't think it's free anymore but it is very effective.

  9. #9
    Join Date
    Mar 2012
    Posts
    62
    @mythic : Okay..then fine..

  10. #10
    I guess blocking IP of such spam mails is the best way to rule out spam. There is no short cuts now a days to block smaps.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles