The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

PHP Script

  • # January 1, 2009 at 8:21 am

    Hey everyone,

    I have a php script that I use for forms to email, it works well and it does roughly what I want it to do.

    however, I have put a javascript file on to my form pages, to try and force people to fill in the forms, before the details are processed by the php. My problem is robots…… they seem to be able to bypass this check, and go straight into the php file and I get emails from nothing with the details blank.

    Checking the headers these emails do not seem to come from anyone.

    so my question is this:

    I want to add a bit more of a catch, that checks the $email variable would this be enough?:

    if($email == “”) {
    print ““;

    I am adding this after the body has been populated so that the email variable should have been assigned.

    I am asking as I am not really up with php, I can slowly get by with enough checking from google and the likes, but I can’t seem to find what I am looking for.

    # January 3, 2009 at 6:45 am

    This reply has been reported for inappropriate content.

    I tried this myself and it seems to work, here is hoping the robots get sent away

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed