The username $_POST[u1] is already in use.
Please, select another one."; } else { $to = $_POST[e1]; $subject = "Your $_SERVER[HTTP_HOST] registration"; $message = "Hello,\nthis is your login information for $_SERVER[HTTP_HOST]\n\nUsername: $_POST[u1]\nPassword: $_POST[p1]\n\nHave some fun with http://$_SERVER[HTTP_HOST]"; $from = "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>"; mail($to, $subject, $message, $from); $_SESSION[username] = $_POST[u1]; header("location:post.php"); exit(); } } //get the templates require_once("templates/MainHeader.php"); require_once("templates/MainRegister.php"); require_once("templates/MainFooter.php"); ?>