Created
October 20, 2012 17:41
-
-
Save dpmckenzie/3924169 to your computer and use it in GitHub Desktop.
File for opening a 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 | |
$mysqli = new mysqli('[address of database]', '[username]', '[password]', '[database name]'); | |
// check connection | |
if (mysqli_connect_errno()) { | |
exit('Connect failed: '. mysqli_connect_error()); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment