// Strip \r and \n from the email address $_POST['email'] = str_replace("\r", "", $_POST['email']); $_POST['email'] = str_replace("\n", "", $_POST['email']);