The username $_POST[NewUsername] is already in use!
Select another one, please!
"; //session_register("regtype"); unset($_POST[NewUsername]); } elseif(ereg("key 3", mysql_error())) { $error = "You are already registered!
Update your account, please!
"; unset($_POST); } else { $last = mysql_insert_id(); $_SESSION[NewAgent] = $last; //send an email $to = $_POST[email]; $subject = "Your registration at $_SERVER[HTTP_HOST]"; $message = "Hello $_POST[FirstName] $_POST[LastName],\nhere is your login information for $_SERVER[HTTP_HOST]\n\nUsername: $_POST[NewUsername]\nPassword: $_POST[p1]\n\nTo login, follow this link:\nhttp://$_SERVER[HTTP_HOST]/login.php\n\nThank you for your registration!"; $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_POST] <$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); if($aset[Sitefee]=="1") { header("location:login.php"); exit(); } else { // header("location:login.php"); header("location:prices.php"); exit(); } } } //get the templates require_once("templates/HeaderTemplate.php"); require_once("templates/RegistrationTemplate.php"); require_once("templates/FooterTemplate.php"); ?>