RE: [PHP] group comparision
| From: | Don Read | Date: | Thu, 17 May 2001 20:06:43 +0000 |
| Subject: | RE: [PHP] group comparision | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53306@lists.php.net to get a copy of this message | ||
On 17-May-01 charles@lunarmedia.net wrote:
> i have a php script that has three variables that could be set to "1"
> depending on the values of a form being sent to the .php file.
>
> $add
> $remove
> $view
>
> i need to do some error control in my script to make certain that one and
> only one of these is set to "1". i am coming up with a very long
> control structure:
>
> if (($add="1") && ($remove="1") || ($add="1")
> && ($view="1") || etc...))
>
if (($add + $remove + $view) > 1) {
die("I'm so confused ...");
}
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.