Re: reason for a "Notice:.." on one site but not another? (Same code.)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




If you switch it around you'll get a notice because the IF evaluates
from left to right. So you just want to make sure you check isset() first.

This would throw a notice:

if($_POST['UserWishesDateRange']  == 'T' &&
isset($_POST['UserWishesDateRange'])) {

Aha! That must be what I tried and was still getting the notice! Interesting that it works (without notice) if we check against the isset () one first. It makes if() look more intelligent that I would think... as if it saying, "good now that we've established that the var isset, now is it also equal to '___'., as opposed to just, "is var set, and is var equal to "___'.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux