[code]$title = (isset($_POST['title'])) ? strip_tags(htmlentities($_POST['title'])) : false; $err = ($title && preg_match("/[A-Za-z0-9]{3, 50}/", $title)) ? '' : "Your title must be at least three characters long and only letters and numbers.<br />\n"; $author = (isset($_POST['author'])) ? strip_tags(htmlentities($_POST['author'])) : false; $err .= ($author && preg_match("/[A-Za-z0-9]{3, 50}/", $author)) ? '' : "Your name must be at least three characters long and only letters and numbers.<br />\n"; $email = (isset($_POST['email'])) ? strip_tags(htmlentities($_POST['email'])) : false; $err .= ($email && preg_match("/[+]@[+]\.[A-Za-z]{2,3}/", $email)) ? '' :"Your e-mail address must be valid.<br />\n"; $comment = (isset($_POST['comment'])) ? strip_tags(htmlentities($_POST['comment'])) : false; $err .= ($comment && strlen($comment) > 3 && strlen($comment) < 500) ? '' :"You must have at least 3 characters in your comment, but not over 500.<br />\n";[/code] This code never works correctly, even when the values are correct. Any idea why?