Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <?php
  2. $dbservername = "93.119.26.250";
  3. $dbusername = "zp_hid7022";
  4. $dbpassword = "WzHztcNQKtNBcPap";
  5. $dbname = "zp_hid7022";
  6.  
  7. $username = "Sebastian_Barrington";
  8. $password = "parola";
  9. strtoupper(hash('whirlpool', $password));
  10.  
  11. if (mysql_connect($dbservername, $dbusername, $dbpassword))
  12. {
  13. $connection = mysql_connect($dbservername, $dbusername, $dbpassword);
  14. mysql_select_db($dbname, $connection);
  15. $nameexist = mysql_query("SELECT `Username` FROM `Accounts` WHERE `Username` = '$username'");
  16. if(mysql_num_rows($nameexist) == 0)
  17. {
  18. Contul a fost creat cu succes.
  19. mysql_query("INSERT INTO `Accounts` (`Username`, `Password`, `Accepted`) VALUES ('$username', '$password', '1')");
  20. }
  21. else
  22. {
  23. Deja exista un cont cu numele.
  24. }
  25. }
  26. else
  27. {
  28. echo "<script>location.href = 'http://pro-roleplay.ro/erorpage'</script>";
  29. }
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement