Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/*
PHP and MySQL tutorial
https://parzibyte.me/blog/en
*/
$password = "";
$user = "root";
$databaseName = "mysql_tutorial";
try{
$database = new PDO('mysql:host=localhost;dbname=' . $databaseName, $user, $password);
}catch(Exception $e){
echo "Error connecting to db: " . $e->getMessage();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment