if its never entering hte test process maybe you're not holding what you think you are in the arrays. each time through the loop, before the if statemetn, just add a print_r($shell[$cntr]) and/or print_r($grp[$cntr] == ""). for that matter you could print_r both arrays so you can see exactly what they contain. they must be getting set to something if that logic does not work. Do you possibly have default values in the HTML? are these checkboxes, which don't get added to the POST/GET arrays if they are not checked? hth jeff "NIPP, SCOTT V (SBCSI)" To: "CPT John W. Holmes" <holmes072000@charter.net>, php-db@lists.php.net <sn4265@sbc.com> cc: Subject: RE: Logic Help... 08/27/2003 10:04 AM Thanks for the feedback. This seems to have helped, but something is still not working with the logic. Here is the updated code: <?php while($cntr != 0) { $cntr--; if (($shell[$cntr] == "") || ($grp[$cntr] == "")) { echo "<p align=\"center\"><font color=\"#99CCCC\" size=\"4\">Sorry, but your request was not filled out completely. Please resubmit this request ensuring that you have selected a Primary Group and Default Shell.</font></p>"; echo "<p align=\"center\"><font color=\"#99CCCC\" size=\"4\">Please follow this <a href=\"http://ldsa.sbcld.sbc.com/DW/NewUser/newuser.php\">link</a> to return to the beginning of the request process.</font></p>"; exit; } } ?> Now, the test conditions never seem to enter into this portion of code. I am unable to figure out why at this point. Thanks again for the help. -----Original Message----- From: CPT John W. Holmes [mailto:holmes072000@charter.net] Sent: Tuesday, August 26, 2003 9:15 AM To: NIPP, SCOTT V (SBCSI); php-db@lists.php.net Subject: Re: Logic Help... From: "NIPP, SCOTT V (SBCSI)" <sn4265@sbc.com> > This isn't specifically a DB related question, but... The following > code snippet is not functioning for me. I keep receiving a parse error on > the "if" line. Basically I want to stop execution of this page if either of > the conditions in the "if" statement exist. Thanks in advance. > > > # while($cntr != 0) { > # if (($shell[$cntr] eq "") || ($grp[$cntr] eq "Primary Gr")) { Umm... you don't use 'eq' in PHP, you use == (that's two equal signs). ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php