if (!preg_match('/^[A-Za-z0-9\s]+$/', $post['title'])) $errors[] = "Only letters, number, and spaces are allowed in title.";
iif (!preg_match('/^[A-Za-z0-9\s]+$/', $post['title']) AND $type == 'thread') $errors[] = "Only letters, number, and spaces are allowed in title.";
Re: //title