'), array('<', '>'), $_POST['note'])); if ($_POST['op']) { if (!$name) { $error = 'You must fill out a nickname!'; } elseif (!preg_match("/^[a-z0-9|`_\\\^\-\{\ \}\[\]]+$/i", $name)) { $error = 'This name contains forbidden chars'; unset ($nick); } elseif ((!$day || !$month || !$year) && !checkdate($month, $day, $year)) { $error = 'The date is invalid!'; unset ($day, $month, $year); } elseif (strlen($note) > $config_max_note_length) { $error = 'Your note is ' . (strlen($description) - $config_max_note_length) . ' characters too long! Please rephrase.'; } elseif (!$str) { $error = "You must fill out an address!"; } elseif (!$city) { $error = "You must fill out a city!"; } elseif (!$cnp) { $error = "You must fill out a CNP!"; } if ($_POST['op'] == 'Preview' && !$error) { require_once('inc_header.php'); echo '