Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] Simple PHP filter not working

Started by ed209 Feb 1, 2008 at 1:53 PM 4 replies 850+ views
Original Post
ed209
ed209
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.
ToohrVyk
ToohrVyk
We are truly sorry that your code does not work, and we hope that you will be able to sort out the problem.

We are of course ready to help you if you wish, just post the details of your problem and we'll try something.
chosendl
chosendl
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?
ed209
ed209
Thats the only code in my script. I guess I'll have to find another way to filter the input.
sigsegv42
sigsegv42
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.
ed209
ed209
Sorry for being very vague. I think I figure out the problem anyways.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.