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)" <[EMAIL PROTECTED]> To: "ODCS" <[EMAIL PROTECTED]> Cc: "PHP Windows" <[EMAIL PROTECTED]> 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 > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php