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

From: Date: Mon, 10 Aug 2009 15:45:46 +0000
Subject: Re: reason for a "Notice:.." on one site but not another? (Same code.)
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-296554@lists.php.net to get a copy of this message
John Butler wrote: >> if(isset($_POST['UserWishesDateRange']) && >> $_POST['UserWishesDateRange'] >> == 'T') { > > > Thought I tried that. Apparently not exactly; it works now! Thanks. I > know it is clunky but I wanted to see how compact it could be done. 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'])) { -- Thanks! -Shawn http://www.spidean.com

« previous php.general (#296554) next »