[thelist] PH isset and is_empty

fstorr fffrancis at fstorr.demon.co.uk
Thu Jul 3 12:30:03 CDT 2003

Hi all

I'm trying to do some basic PHP form validatation.  I'm passing a
variable through the the form processing page and picking it up fine
using $HTTP_POST_VARS.  However, I'm having problems checking to see if
the user has entered nothing (I know that I can just do if (!$var) but I
want to explore further).

Looking at the manual, it seems the following should work:

If (isset($var))

But if I type in nothing, it still returns true, which I don't
understand at all.  Surely if there is nothing there, the variable
doesn't exist. I've also experiemented with is_null (always returns
false).  The only thing that seems to work is is_empty.




More information about the thelist mailing list