$error++; $langs->load("errors"); $mesg=$langs->trans("ErrorSizeTooLongForVarcharType"); $action = 'edit'; } if (! $error) { if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname'])) { $result=$extrafields->update($_POST['attrname'],$_POST['type'],$_POST['size'],$elementtype); if ($result > 0) { if (isset($_POST['label'])) { $extrafields->update_label($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['size'],$elementtype); } Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { $error++; $mesg=$extrafields->error; } } else { $error++; $langs->load("errors"); $mesg=$langs->trans("ErrorFieldCanNotContainSpecialCharacters",$langs->transnoentities("AttributeCode"));