diff --git a/contact.php b/contact.php index f1dea20..b631e54 100644 --- a/contact.php +++ b/contact.php @@ -13,6 +13,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { $points = (int)0; $badwords = file(SPAMWDS); + $requiredFields = array("name", "email", "comments"); foreach ($badwords as $word) if ( @@ -52,7 +53,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { $message = "You received this e-mail message through your fanlisting: \n\n"; foreach ($_POST as $key => $val) { - $message .= ucwords($key) . ": " . clean($val) . "\r\n"; + $message .= ucwords($key) . ": " . cleanUp($val) . "\r\n"; } $message .= "\r\n"; $message .= 'IP: '.$_SERVER['REMOTE_ADDR']."\r\n"; diff --git a/join.php b/join.php index 50743fe..545f3c7 100644 --- a/join.php +++ b/join.php @@ -69,7 +69,7 @@ if (isset($_POST['submit'])) { $error_msg .= "That name is not valid. Your name must contain letters only, and must be less than 15 characters. \r\n"; if ($clean['dispemail'] != "yes" && $clean['dispemail'] != "no") $error_msg .= "You didn't choose whether or not you'd like to show your e-mail address on the member list. \r\n"; - if ($clean['fave'] != "" && (!preg_match("/^[a-zA-Z0-9-'\s]*$/", $clean['face']) || strlen($clean['fave']) > 20)) + if ($clean['fave'] != "" && (!preg_match("/^[a-zA-Z0-9-'\s]*$/", $clean['fave']) || strlen($clean['fave']) > 20)) $error_msg .= "Your chosen \"favourite\" is not valid. It must contain letters and numbers only, and must be less than 20 characters. \r\n"; if (!preg_match('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+' . '(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', strtolower($clean['email']))) $error_msg .= "The email address you have used is not valid. \r\n"; @@ -175,7 +175,7 @@ if (!isset($_POST['submit']) || $show_form == true) { if (isset($_POST['country'])) $country = $_POST['country']; else $country = NULL; ?> -
\ No newline at end of file