Example #1
0
 /** Set a specific field to a specific value.  User-controlled data is safe to be sent as the value.  If
  * a user is allowed to control the 'name', he can cause an Exception, but no damage. 
  * Unless the third parameter is set to false, all HTML tags and special characters are removed.  Don't 
  * set removeHTML to false if the user controls the value being set, unless you're sure you know what 
  * you're doing! */
 public function set($strName, $strValue, $removeHTML = true)
 {
     if (!clsDB::isValidFieldName($strName)) {
         throw new Exception(ERRORMSG_INVALID);
     }
     $strName = strtolower($strName);
     $strValue = clsDB::escapeValue($strValue, $removeHTML);
     $this->arrData[$strName] = $strValue;
 }