Something like this will work... <?php
if(empty($_GET['1']) && empty($_GET['2']) && empty($_GET['3']) && empty($_GET['4'])){ echo "All vars are EMPTY"; }else{ echo "Some vars contain Content"; } ?> <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > The db will include these 4 rows even though they don't store data. > Eventually they will contain data for contact info as soon as the users > log in and it prompts them for it. > > On Tue, 26 Nov 2002, DL Neil wrote: > > > Ed, > > Assuming there will be a response from the db-tbl, here is another choice: > > > > if ( $lineone . $linetwo . $linethree . $linefour > "" ) > > { > > //show it to the user and ask if they want to change it > > } > > else > > { > > //prompt for information > > } > > > > Do you mean that the db-tbl will have a row of data even if the four fields > > are empty, or if there is no data (in those fields) will that imply that > > there is no row (and thus different code needed)? > > =dn > > > > > > > All four must be an empty string. I will be pulling the values from a > > > MySQL database. If these fields are empty I'll be prompting for > > > information. If any one of them contain anything I'll be showing it to > > > the user and asking if they want to change it. > > > > > > Thanks, > > > > > > Ed > > > > > > > > > On Tue, 26 Nov 2002, Ernest E Vogelsinger wrote: > > > > > > > At 13:50 26.11.2002, [EMAIL PROTECTED] said: > > > > --------------------[snip]-------------------- > > > > > I'll be trying to use a routine that checks 4 seperate variables for > > > > >content and need to know the easiest method to do so. The function > > works > > > > >on 2 conditions; either all the variables are empty and I do something > > or > > > > >I do something else. > > > > > > > > > >$lineone > > > > >$linetwo > > > > >$linethree > > > > >$linefour > > > > > > > > > > Would you use > > > > > > > > > >if ($lineone && $linetwo && $linethree && $linefour = "") > > > > --------------------[snip]-------------------- > > > > > > > > Your expression yields true if 1-3 are not-empty AND four is an empty > > > > string. Not sure if that's what you want. > > > > > > > > All empty: > > > > !($lineone || $linetwo || $linethree || $linefour) > > > > --or-- > > > > !$lineone && !$linetwo && !$linethree && !$linefour > > > > > > > > All set: > > > > $lineone && $linetwo && $linethree && $linefour > > > > > > > > > > > > -- > > > > >O Ernest E. Vogelsinger > > > > (\) ICQ #13394035 > > > > ^ http://www.vogelsinger.at/ > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php