SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    LONDON,UK
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Spam protection ?

    hi guys
    stupid question from a beginner here

    I want to insert a VERY SIMPLE form on a charity's website which asks users to insert their email address in order to be added to the charity's mailing list ..ie just a text box on a web page.

    I'm using Dreamweaver 8 for this.

    Do I need to be worried about SPAM ? I mean will spambots fill in the form and bombard the charity's email address which unfortunately is outlook express and therefore not good at filtering spam ?

    I don't want this worthy charity to be forced to close down their email account.

    Advice much appreciated !

    thanks

  2. #2
    SitePoint Addict
    Join Date
    Feb 2008
    Location
    New Jersey, USA
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's what I do with my email forms, and it seems to work pretty well...

    I set up a text field and call it 'info' or whatever you'd like to call it. <input type="text" name="info" class="formInfo">. Then in my external CSS file, I create a 'formInfo' class and make it hidden. This way, the field is hidden on the form, but the bots don't know that. Then when I set up my form validation, I make it so that if there's anything in that field, it'll be invalid (there's no way a human could input anything, but a bot certainly will).

    That seems to work pretty well for me...

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Newcastle Upon Tyne
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've found that adding a simple text field with a question along the lines of 'What is the answer to 2+2' can cut down the number auto submissions.
    You would need to take account of people typing 'four' as well as 4 in the validation though.

  4. #4
    SitePoint Addict
    Join Date
    Feb 2008
    Location
    New Jersey, USA
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by greenmedia View Post
    I've found that adding a simple text field with a question along the lines of 'What is the answer to 2+2' can cut down the number auto submissions.
    You would need to take account of people typing 'four' as well as 4 in the validation though.
    Note that I would make the 2+2 an image, so that bots can't read it. Although I'm not sure they would read it as text anyway.

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dtm32236 View Post
    Here's what I do with my email forms, and it seems to work pretty well...

    I set up a text field and call it 'info' or whatever you'd like to call it. <input type="text" name="info" class="formInfo">. Then in my external CSS file, I create a 'formInfo' class and make it hidden. This way, the field is hidden on the form, but the bots don't know that. Then when I set up my form validation, I make it so that if there's anything in that field, it'll be invalid (there's no way a human could input anything, but a bot certainly will).

    That seems to work pretty well for me...
    Except that people without a CSS capable device will see the form input (such as me when I'm on my cell phone).

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    LONDON,UK
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok i'll have to battle it out about how to include an invisible text field in my form -can anyone help me out with the server-side scripting needed to process this simple form - ie just gather the web users' email address and send it somewhere

    many thanks
    newhere

  7. #7
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good stuff - thanks.

  8. #8
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,222
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    It depends on the server language you use

    If it is php and the method is GET (and saving it inside a variable)

    Code:
    $myVar = $_GET["name_of_variable_in_form"]
    If it is php and the method is POST

    Code:
    $myVar=$_POST["name_of_variable_in_form"]
    if you are using ASP and the method is GET

    Code:
    varName = request.querystring("name_of_variable_in_form")
    if you are using ASP and the method is POST
    Code:
    varName= request.Form("name_of_variable_in_form")
    Of course, you can use ASP .NET, then it is a bit different because you'd be using <asp:label></asp:label>

  9. #9
    Non-Member
    Join Date
    Jul 2008
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Spam them back...

  10. #10
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bullshitwebsites View Post
    Spam them back...
    Two wrongs never make a right.


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
  •