Skip to content

Instantly share code, notes, and snippets.

@dev-jaydeep
Last active January 9, 2020 10:52
Show Gist options
  • Save dev-jaydeep/459aee0a52e422064306ad1fe6829848 to your computer and use it in GitHub Desktop.
Save dev-jaydeep/459aee0a52e422064306ad1fe6829848 to your computer and use it in GitHub Desktop.
<?php
global $db;
$db = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
// Check connection
if ($db->connect_errno) {
echo "Failed to connect to MySQL: " . $db->connect_error;
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment