-
-
Save kparms/ffc34290d0c4305dbe21e5f0887c07d9 to your computer and use it in GitHub Desktop.
Config.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
DEFINE("DB_HOST","localhost"); | |
DEFINE("DB_USER","ricky"); | |
DEFINE("DB_PASS","is_a_douche"); | |
DEFINE("DB_NAME","rekt"); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//config file is not included in public repo for security reasons | |
require_once('config.php'); | |
//CREATE A CONNECTION TO SQL | |
$mysqli = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME); | |
/* check connection */ | |
if (mysqli_connect_errno()) { | |
printf("Connect failed: %s\n", mysqli_connect_error()); | |
exit(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment