Guest User

Untitled

a guest
Apr 9th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. function user_create($username, $email, $password, $confirmpassword, $nickname, $website, $profilecolor) { // Creates new users
  2.  
  3. if($password != $confirmpassword) {
  4. header("Location: register.php?error=pwdmatch&username=$username&email=$email&nickname=$nickname&website=$website");
  5. die();
  6. }
  7. $encryptedpass = md5($password);
  8. $session = //secret stuff
  9. $query = "insert into users set username='$username', password='$encryptedpass', email='$email', displayname='$nickname', website='$website', session='$session'";
  10. if (mysql_query($query)) {
  11. $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";
  12.  
  13. if (sendEmail($email, "App of the Day; Thanks for registering", $message)) {
  14.  
  15.  
  16. user_login($username, $password, false);
  17. }
  18. }
  19. if(mysql_errno() == 1062) { header("Location: register.php?error=userexists&username=$username&email=$email&nickname=$nickname&website=$website");
  20. die();
  21. }
  22.  
  23. }
Add Comment
Please, Sign In to add comment