RE: [PHP] group comparision

2001-05-17 Thread Don Read
On 17-May-01 [EMAIL PROTECTED] 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 t

Re: [PHP] group comparision

2001-05-17 Thread charles
I don't think this is quite what I am looking for because I am hoping to issue an error message if more than one variable has a value of one. Sorry for not including this as a stipulation. Thanks -Charles On Thu, 17 May 2001, elias wrote: > I understand that you want to check if: > > i need t

Re: [PHP] group comparision

2001-05-17 Thread Mohamed LRHAZI
You might also want to check the xor logical op: http://www.php.net/manual/en/language.operators.logical.php Mohamed~ [EMAIL PROTECTED] 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 >

Re: [PHP] group comparision

2001-05-17 Thread elias
I understand that you want to check if: > 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: "One and Only One" okay, ... if ($add == "1") { // do the add job } elseif ($remove == "1") {

RE: [PHP] group comparision

2001-05-17 Thread Taylor, Stewart
How about if (($add + $remove + $view) > 1) { //error } -Stewart -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 17 May 2001 09:45 To: php-gen Subject: [PHP] group comparision i have a php script that has three variables that could be set to

[PHP] group comparision

2001-05-17 Thread charles
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 contr