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

fhaseltine at aol.com fhaseltine at aol.com
Sun Aug 20 13:20:38 MDT 2006


 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   
 





On Aug 20, 2006, at 10:26 AM, FHASELTINE at aol.com wrote:



> I am able to have a search with multiple selection criteria and the  

> proper records are returned.

>

> If a search is done - I am able to code the targeted page so that a  

> single search item needs to be entered - for example a posted field  

> "LastName" and that would be OK if only one field was searchable.

>

> My search is designed with five search elements, now any of my  

> fields can be entered. Examples are: "LastName" or "State" etc.

>

> I so not have any restrictive coding so when nothing is entered,  

> all records are returned.

>

> My problem is that I want at least one of my five $Field = $_POST 

> ['Fields'] to be filled in and have a value.

>

> Any entry would do.

> Any suggestions?

>

> Thanks

>

> Florence  Haseltine

> AIM: Fhaseltine

> fhaseltine at aol.com

> 240-476-7837

>Date: Sun, 20 Aug 2006 10:48:55 -0500

From: Bob Patin <bob at patin.com>

Subject: Re: [FX.php List] Returning a search with multiple entries

To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>

Message-ID: <ABED8F3C-35CC-4ACA-B1C3-11F9CFB7B620 at patin.com>

Content-Type: text/plain; charset="us-ascii"



Oops, I forgot a close parenthesis after "($ZIP)" it should read:



    ... and empty ($STATE) and empty($ZIP)) {



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 10:40 AM, Bob Patin wrote:

> Florence,
>
> In your processing page, run a check to make sure that one or more  
> of the fields have been filled in; here's what I would use:
>
>   if (empty($NAME) and empty($ADDRESS) and empty($CITY) and empty  
> ($STATE) and empty($ZIP) {
>       // SHOW ALERT WINDOW, BOUNCE THEM BACK TO PREVIOUS PAGE
>       <script language="Javascript">
>       alert ("Please fill in one or more search fields.")
>       history.back()
>       </script>
>   }
>
> 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*******************************************

   
________________________________________________________________________
Check out AOL.com today. Breaking news, video search, pictures, email and IM. All on demand. Always Free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060820/016e46fc/attachment.html


More information about the FX.php_List mailing list