40) $error=true; // sprawdzamy dlugosc zmiennych if (strlen($_POST['name'])>40) $error=true; if (strlen($_POST['content'])>1024) $error=true; if (!$error) { // jesli nie wykryto "bledow" mail(...) // wysylamy wiadomosc } } function checkField($field) { $badTags=array('MIME-Version','BCC','Content-Transfer-Encoding','[url','[/url]','cc:','MIME format','Content-Type'); foreach ($badTags as $badTag) { if (stristr($field,$badTag)) { return false; } } return true; } ?>