[FX.php List] Checking to see if one of any field is filled in .

Bob Patin bob at patin.com
Sun Aug 20 13:27:46 MDT 2006


I would've thought that the AND in there would make it look for all 5  
fields to be empty.

Here's another way:

if  (  (isset($field1) && strlen(trim($field1)) > 0) or (isset 
($field2) && strlen(trim($field2)) > 0) )
{
     # code...
}

This says, if field 1 has something, or field2 has something, then do  
the code

Hope this helps,

Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com

   CONTACT US VIA INSTANT MESSAGING:
      AIM or iChat: longterm1954
      Yahoo: longterm_solutions
      MSN: tech at longtermsolutions.com
      ICQ: 159333060



On Aug 20, 2006, at 2:20 PM, fhaseltine at aol.com wrote:

> Bob, thanks for the suggestion on ensuring fields are entered.   
> However, I used the code, and it forced all the fields to be filled  
> in.  I just need anyone of the 5 fields to have a value.
>
> Florence Haseltine
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060820/f4582ab7/attachment.html


More information about the FX.php_List mailing list