<?PHP
$server = "localhost"; 
$username = "root";
$password = "benk"; 
$database = "ebarbuk";
$tahun_now  = "barbuk2019";
$tahun_before  = "barbuk2018";
$tahun_next  = "barbuk2020";
if ($database == ""){
	$query = "ebarbuk";
	if (mysql_query($query) == null){	
		$query = "CREATE DATABASE ebarbuk";
		mysql_query($query);
		$conn = mysql_connect($server,$username,$password) or die ("Could not connect MySQL"); 
		mysql_select_db($database,$conn) or die ("Could not open database");
	}
	else{
		$database= "ebarbuk";
		$conn = mysql_connect($server,$username,$password) or die ("Could not connect MySQL"); 
		mysql_select_db($database,$conn) or die ("Could not open database");		
	}	
}
else{
	$conn = mysql_connect($server,$username,$password) or die ("Could not connect MySQL"); 
	mysql_select_db($database,$conn) or die ("Could not open database");
}
?>