Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function user_create($username, $email, $password, $confirmpassword, $nickname, $website, $profilecolor) { // Creates new users
- if($password != $confirmpassword) {
- header("Location: register.php?error=pwdmatch&username=$username&email=$email&nickname=$nickname&website=$website");
- die();
- }
- $encryptedpass = md5($password);
- $session = //secret stuff
- $query = "insert into users set username='$username', password='$encryptedpass', email='$email', displayname='$nickname', website='$website', session='$session'";
- if (mysql_query($query)) {
- $message = "App of the Day Member, \n \n Thanks for registering, here's your login information; \n Username: $username \n Password: $password \n \n \n Let us know if there is anything else we can help you with! \n \n The App of the Day Team";
- if (sendEmail($email, "App of the Day; Thanks for registering", $message)) {
- user_login($username, $password, false);
- }
- }
- if(mysql_errno() == 1062) { header("Location: register.php?error=userexists&username=$username&email=$email&nickname=$nickname&website=$website");
- die();
- }
- }
Add Comment
Please, Sign In to add comment