Monday, May 31, 2010

What is a PHP Filter?

What is a PHP Filter?

2 comments:

  1. A PHP filter is used to validate and filter data coming from insecure sources.

    ReplyDelete
  2. Email filter

    if(!filter_has_var(INPUT_GET, "email"))
    {
    echo("Input type does not exist");
    }
    else
    {
    if (!filter_input(INPUT_GET, "email", FILTER_VALIDATE_EMAIL))
    {
    echo "E-Mail is not valid";
    }
    else
    {
    echo "E-Mail is valid";
    }
    }

    ReplyDelete