-
-
Save gyprosetti/715e2344708256acaf23 to your computer and use it in GitHub Desktop.
Connect to database
This file contains 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 | |
error_reporting(E_ERROR); | |
//Connection To MYSQL DataBase | |
//Function called in external scripts | |
function DBConnect(){ | |
//add further global vars at the end of the line below once you have created them in the database admin tool | |
global $Host, $User, $Password, $DBName, $Table_1, $Table_2, $Table_3; | |
$Host = "host"; | |
$User = "me"; | |
$Password = "opensesame"; | |
$DBName = "mydatabase"; | |
//add links to new tables here | |
$Table_1 = "admin"; | |
$Table_2 = "registration"; | |
$Table_3 = "comments"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment