Well, it should never be, it comes from a drop down that only has 3 options,
any, all or exact
Any caveats there?


-----Original Message-----
From: David Otton [mailto:[EMAIL PROTECTED]
Sent: Monday, July 14, 2003 2:58 PM
To: Petre Agenbag
Subject: Re: [PHP] elegant way of doing something else the last time
through a loop? SOLVED


On 14 Jul 2003 14:35:28 +0200, you wrote:

>if ($_POST[any_all] == "any") {
>       $logic = "or";
>}
>elseif ($_POST[any_all] == "all") {
>       $logic = "and";
>}
>elseif ($_POST[any_all] == "exact") {
>       $logic = "exact";
>}

[...]

>               if (!empty($temp)) $temp .= ' '.$logic.' ';

Consider what would happen to $logic if $_POST['any_all'] was 'xyzzy'.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to