syntax error, unexpected '$query' (T_VARIABLE) :     <?php
    $host_name = "localhost"; 
	$username  = "root";
	$password  = "";
	$database  = "jaka_crud_ci";


	$koneksi = mysqli_connect($host_name, $username, $password, $database);
	mysql_select_db($database);
		
	$query = mysqli_query($koneksi, "SELECT * FROM pembeli";
	$hasil = mysqli_query($query);

	while ( $buyer = mysqli_fetch_assoc($hasil)){
	echo $buyer ['Nama'];
	echo $buyer ['Barang'];
	echo $buyer ['Retribusi'];
	}
    ?>

i have that line of code, its produce syntax error unexpected '$query'(T_VARIABLE). Whats wrong ? 