Guest User

Untitled

a guest
May 25th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <?php
  2. //MLPONLINE ACCOUNT CREATION FUNCTIONS
  3. //By RainbowDash
  4. //
  5. // mlp_signup($username,$password)
  6. //FUNCTION:Add's the user to a
  7. //INPUTS:$username:Username of the user.$password:UNENCRYPTED password of the user.$email:email of the user.
  8. //OUTPUTS:1 if succesful,0 if an error has occured (wont usually happen unless filter's are added)
  9. //NOTE:The pass
  10. //WARNING:Moving this file out of the directory its in will cause it to fail as it depends on other files in this directory
  11. require_once("mlp_config.php");
  12. function mlp_signup($username,$password,$email) {
  13. mlp_connect();
  14. $username = mysql_real_escape_string($username);
  15. $password = mysql_real_escape_string($password);
  16. $email = mysql_real_escape_string($email);
  17. $salt="1A2b3CD4gJh4DFE4ZZZ!@#@AA!@CCV#$$VVD#@#$$#";
  18. $password = hash("sha512", $password . $salt);
  19. mysql_query("INSERT INTO accounts (acct, name, pass, email, lastlogin) VALUES ('', '$username', '$password', '$email', '')");
  20. mysql_close($con);
  21. return 1;
  22. }
  23. ?>
Add Comment
Please, Sign In to add comment