> Adam,
> It's really better to use the isset() instead of empty() because if you
set
> the error level report to E_ALL you will see that PHP will produce
warnings
> if the variable is not set at all!

empty() and isset() are totally different.
If a variable is set, but is set to nothing (or a value of 0), then the
isset() will still hold true, whereas empty() will check that the variable
contains a value other than a blank or 0.

A workaround to the empty() statement?

if ( (isset($var)) && (!empty($var)) )
{
}

or:

if ($var!='')
{
}

There are other ways to do this but the main point is making sure the
varible is not passed as empty when the form is used.
-Adam



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to