Skip to content

Instantly share code, notes, and snippets.

@rizkyramadhan21
Created February 14, 2018 13:01
Show Gist options
  • Save rizkyramadhan21/3f297ea763c7c746248eba1609f4885b to your computer and use it in GitHub Desktop.
Save rizkyramadhan21/3f297ea763c7c746248eba1609f4885b to your computer and use it in GitHub Desktop.
<?php
define('DBHOST', 'myhost');
define('DBUSER', 'myuser');
define('DBPASS', 'mypassword');
define('DBNAME', 'mydatabase');
$db = new mysqli(DBHOST, DBUSER, DBPASS, DBNAME);
if ($db->connect_error) {
die("Koneksi ke database gagal!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment