$_POST[username] is already in use!
Select another one, please."; } else { //send an email to the new user $to = $_POST[yemail]; $subject = $aset[RegSubject]; $message = str_replace("##name##", $_POST[yname], $aset[RegEmail]); $message = str_replace("##username##", $_POST[username], $message); $message = str_replace("##password##", $_POST[p1], $message); $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; //mail($to, $subject, $message, $headers); $last = mysql_insert_id(); $_SESSION[nemail] = $_POST[yemail]; header("location:thankyou.php"); exit(); } } require_once("templates/header.php"); require_once("templates/RegisterForm.php"); require_once("templates/footer.php"); ?>