Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- AshlandGaming's finest Login System.
- Copyright (c) AshlandGaming 2018 - I'm not dead yet.
- This is for Enternode. *sighs* oh well.
- */
- define("DB_SERVER", ""); // your hostname or IP address
- define("DB_USER", ""); // your username
- define("DB_PASS", ""); // your password
- define("DB_DATABASE", ""); // name of database
- class Security {
- function sanitise_data($data) {
- $data = mysqli_real_escape_string(htmlentities($data)); // to stop the hackers (not in quotes <3)
- }
- }
- $username = Security::sanitise_data($_POST['username']); // don't want any accidents.
- $password = Security::sanitise_data($_POST['password']); // same here <3
- if($conn = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE)) {
- echo "Successfully connected! √";
- } else {
- echo "Well, someone is to blame. Maybe GalaxyArts?! XD just kidding."; // enter whatever you want here! anything you like.
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement