Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Include "Configuration.php";
- If(LOGGED_IN) Header("Location: Index.php?alert=login_loggedin");
- If(IsSet($_POST["username"]) && IsSet($_POST["password"]) && IsSet($_POST["verifypassword"])) {
- If(!UserExist(UserName2Id(Secure($_POST["username"])))) {
- If(Md5(Secure($_POST["password"])) == Md5(Secure($_POST["verifypassword"]))) {
- IPLog(Secure($_POST["username"])." registered.");
- $Query = MySQL_Query("INSERT INTO `users` (`id`, `username`, `password`) VALUES(null, '".Secure($_POST["username"])."', '".Md5(Secure($_POST["password"]))."');");
- $_SESSION["id"] = MySQL_Insert_Id();
- Header("Location: Index.php");
- }Else{
- Header("Location: Index.php?alert=register_passwordsunmatch");
- }
- }Else{
- Header("Location: Index.php?alert=register_nametaken");
- }
- }Else{
- Header("Location: Index.php?alert=error");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement