Created
September 18, 2012 23:13
-
-
Save SMacEwan/3746653 to your computer and use it in GitHub Desktop.
PHP Database connection template
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 | |
//Replace ALL the things! | |
$hostname = 'localhost'; | |
$database = 'testdb'; | |
$username = 'root'; | |
$password = 'root'; | |
$dbh = new PDO('mysql:host=' . $hostname . ';dbname=' . $database, $username, $password); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment