Re: I really don't understand this?
| From: | ODCS | Date: | Wed, 02 Apr 2003 08:33:23 +0000 |
| Subject: | Re: I really don't understand this? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19249@lists.php.net to get a copy of this message | ||
So how should I do this? I am still trying to learn php and this kind of
stuff really confuses me.
----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <B.A.T.Svensson@lumc.nl>
To: "ODCS" <odcs@rogers.com>
Cc: "PHP Windows" <php-windows@lists.php.net>
Sent: Wednesday, April 02, 2003 3:20 AM
Subject: RE: [PHP-WIN] I really don't understand this?
> if (empty($form["name"])) {
>
> $error["name"] = "*";
> $message["name"] = "Required field!";
> } else if ($duplicate = duplicate_name($form["name"]) == "T") {
>
> // This seams to be an assignment of either true or false to
duplicate(???)
> // e.g. $duplicate = (duplicate_name($form["name"]) == "T")
>
> // Hence $duplicate seams to be assign either true or false (1/0) and when
you
> // do this will never trigger the rest of the mutual exclusions, since you
> // only check for weather $duplicate is "T" or "S".
>
>
> $error["name"] = "*";
> $message["name"] = "Screen name already used!";
>
> } else if ($duplicate == "D") {
> $error["name"] = "*";
> $message["name"] = "Database error - Please try again in a few
moments!";
> }
> elseif ($duplicate == "S") {
> $error["name"] = "*";
> $message["name"] = "Server error - Please try
> again in a few moments!";
> }
>
>
> //Anders - as always totally ignorant about PHP syntax
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>