Advertisement
Guest User

Untitled

a guest
Mar 7th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  
  5. AshlandGaming's finest Login System.
  6. Copyright (c) AshlandGaming 2018 - I'm not dead yet.
  7.  
  8. This is for Enternode. *sighs* oh well.
  9.  
  10. */
  11.  
  12. define("DB_SERVER", ""); // your hostname or IP address
  13. define("DB_USER", ""); // your username
  14. define("DB_PASS", ""); // your password
  15. define("DB_DATABASE", ""); // name of database
  16.  
  17. class Security {
  18. function sanitise_data($data) {
  19. $data = mysqli_real_escape_string(htmlentities($data)); // to stop the hackers (not in quotes <3)
  20. }
  21. }
  22.  
  23. $username = Security::sanitise_data($_POST['username']); // don't want any accidents.
  24. $password = Security::sanitise_data($_POST['password']); // same here <3
  25.  
  26. if($conn = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE)) {
  27. echo "Successfully connected! √";
  28. } else {
  29. echo "Well, someone is to blame. Maybe GalaxyArts?! XD just kidding."; // enter whatever you want here! anything you like.
  30. }
  31.  
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement