Hm.  I hope I'm not opening an old wound:

Curious about the proper way to test for the existence of a variable, I 
decided to read up on isset() at php.net's function manual pages.  It 
seems at first to be a way to test whether or not a variable has been 
set.

But reading the annotations below the documentation is mind boggling.  
Back and forth, it seems to go -- and then to find out that one method 
is to be used to test for POSTed variables, and another to be used for 
GETted variables (for $_POST, use "$_POST['var'] !='' ", and for $_GET, 
use "!isset($_GET['var'])").

Pretty confusing.  Can anyone shed some light on whether or not there is 
a final definite way to do this?  I've used (!($_POST['var'])) with no 
problems in the past, but does good coding style suggest that I use 
(!isset($_POST['var'])) now?


Erik





----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to