Sign in to follow this  
ed209

[web] Simple PHP filter not working

Recommended Posts

I'm trying add this code to make sure an input variable is sent: if(!filter_has_var(INPUT_GET, "email")) { echo("Input type does not exist"); } but for some reason theres an error in this code and I can't figure out why it's not working.

Share this post


Link to post
Share on other sites
I cant see anything wrong with that code, you should cutting that if statement out and see if your page still generates an error, perhaps it is actually an error somewhere else on the page.

Also, what does the error say?

Share this post


Link to post
Share on other sites
The code looks fine. Does the code generate a PHP error? Or is the error that the code simply isn't doing what you think it should? Helpful to solving the problem:
- A description of what you're actually trying to accomplish
- The intended results versus the actual results of your code
- The actual page source
- Also, since you're working with a GET variable, the url used to access the script

You just haven't provided enough useful information describing the problem for anyone to do anything but take random guesses at possible solutions.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this