If your purpose is to see if an user wrote or selected anything, you can
do:

if (ereg("^[[:blank:]]*$",$_POST['var'])) {
    // It has only spaces
}

  I am sorry if does not fit your need like I interpreted. But, just for not
getting flamed, !isset() works fine for me on both cases (so far where I
tested);

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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