Re: very large and long if statement

From: Date: Thu, 08 Apr 2004 06:11:18 +0000
Subject: Re: very large and long if statement
Groups: php.general 
Request: Send a blank email to php-general+get-182791@lists.php.net to get a copy of this message
yeah well they are really close but i add a ")" on line 3
From: "Andy B" <aborka1@wmis.net> To: <php-general@lists.php.net> Subject: Re: [PHP] very large and long if statement Date: Thu, 8 Apr 2004 02:03:38 -0400 i dont see any difference in the one you wrote and the one i wrote...they seem to be exactly the same?? ----- Original Message ----- From: "Tyler Replogle" <dbnm@hotmail.com> To: <aborka1@wmis.net>; <php-general@lists.php.net> Sent: Wednesday, April 07, 2004 9:43 PM Subject: RE: [PHP] very large and long if statement hey, i don't know how to make it smaller but should it be if (!empty($_SESSION['add']['type']) && !empty($_SESSION['add']['start_date']) && !empty($_SESSION['add']['end_date']) && !empty($_SESSION['add']['name']) && !empty($_SESSION['add']['county']) && !empty($_SESSION['add']['discription']) && !empty($_SESSION['add']['StartingDay']) && !empty($_SESSION['add']['StartingMonth']) && !empty($_SESSION['add']['StartingYear']) && !empty($_SESSION['add']['EndingDay']}) && !empty($_SESSION['add']['EndingMonth']) && !empty($_SESSION['add']['EndingYear'])) {//run the insert query} else {//show error since one or more fields above are blank} ?
From: "Andy B" <aborka1@wmis.net> To: <php-general@lists.php.net> Subject: [PHP] very large and long if statement Date: Wed, 7 Apr 2004 18:47:02 -0400 I have this very large and long if statement: if (!empty($_SESSION['add']['type']) && !empty($_SESSION['add']['start_date'] && !empty($_SESSION['add']['end_date']) && !empty($_SESSION['add']['name']) && !empty($_SESSION['add']['county']) && !empty($_SESSION['add']['discription']) && !empty($_SESSION['add']['StartingDay']) && !empty($_SESSION['add']['StartingMonth']) && !empty($_SESSION['add']['StartingYear']) && !empty($_SESSION['add']['EndingDay']}) && !empty($_SESSION['add']['EndingMonth']) && !empty($_SESSION['add']['EndingYear'])) {//run the insert query} else {//show error since one or more fields above are blank} was wondering if there was really any way to condense that down to something any better? all fields in the form that those came from are required... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! http://join.msn.com/?page=features/mlb&pgmarket=en-us/go/onm00200439ave/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Check out MSN PC Safety & Security to help ensure your PC is protected and safe. http://specials.msn.com/msn/security.asp

« previous php.general (#182791) next »