Whats the point of isset? Can I just use: if (!$_POST[var]) instead?
The problem with using (!$_POST[‘var’]) as an expression is that you are asking the parser to evaluate the expression as a boolean. If $_POST[‘var’] isn’t a boolean (and it won’t be, because all POST or GET variables are treated as strings unless you cast them) then the parser does an implicit cast to boolean while evaluating your expression. This is fine for most cases, but let’s say that $_POST[‘var’] *is* set to either an empty string (“”) or a string containing zero (“0”). The (!$_POST[‘var’]) test will fail, because both of these are evaluated as FALSE when cast as a boolean. That’s the reason that isset() is a little more general purpose. If you aren’t worried about missing an empty string or a string containing “0” then you can use the (!$_POST[‘var’]) method. For information is in the php manual at: http://www.php.net/manual/en/language.types.boolean.php#language.types.boolean.