function valAlphaNum($str) { if (valNonEmpty($str)) { return ctype_alnum($str); } else { return false; } }
function processPassword($name) { if ($this->isPosted()) { if (isset($_POST[$name])) { $this->setElementValue($name, $this->stripSlashesInVals(trim($_POST[$name]))); } if ($this->elements[$name]["validate"] === true) { if (!valNonEmpty($this->elements[$name]["value"])) { $this->errMsg[] = $this->elements[$name]["error"]; } } elseif ($this->elements[$name]["validate"] !== false) { if (!$this->valComparison($name, $this->elements[$name]["validate"])) { $this->errMsg[] = $this->elements[$name]["error"]; } } } $str = "<input name=\"{$name}\" type=\"password\" class=\"" . $this->elements[$name]["style"] . "\" size=\"" . $this->elements[$name]["size"] . "\" maxlength=\"" . $this->elements[$name]["maxlength"] . "\""; $str .= $this->elements[$name]["default"] ? " value=\"" . htmlentities($this->elements[$name]["value"], ENT_QUOTES) . "\">" : " value=\"\">\n"; return $str; }