Created
May 8, 2017 08:00
-
-
Save simplyniceweb/fcec3b745294f25a657e4c01d1987f6c to your computer and use it in GitHub Desktop.
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 | |
$host = "localhost"; | |
$database = "mydb"; | |
$username = "root"; | |
$password = ""; | |
try { | |
$connection = new PDO("mysql:host=$host;dbname=$database;charset=utf8", $username, $password); | |
} catch(PDOException $e) { | |
echo $e->getMessage(); // message sang error if indi mag connect | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment