Postingan lainnya
Masalah koneksi
ini kenapa ya seperti ini? Warning: mysqli_query() expects at least 2 parameters, 1 given in C:\xampp\htdocs\spk\hasil.php on line 10
<?php
include('header.php');
include('koneks.php');
include('function.php');
include ("function_peta.php");
$w = array();
$v = array();
$hasil = array();
$sql = mysqli_query ("SELECT * FROM tb_rm") or die (mysqli_error());
$kenyamanan = get_bobot(round($_POST['kenyamanan']));
$kebersihan = get_bobot_dua(round($_POST['kebersihan']));
$harga = get_bobot_tiga($_POST['harga']);
$pelayanan = get_bobot_dua(round($_POST['pelayanan']));
$jarak = get_bobot_empat($_POST['jarak']);
array_push($w,$kenyamanan);
array_push($w,$kebersihan);
array_push($w,$harga);
array_push($w,$pelayanan);
array_push($w,$jarak);
$alamat = $_POST['lokasi'];
$lat_lokasi = $_POST['latitude'];
$lng_lokasi = $_POST['longitude'];
if ($alamat != '')
$geo_alamat = geocode($alamat);
else
$geo_alamat = array($_POST['latitude'],$_POST['longitude'])
?>
0
1 Jawaban:
<pre> <?php // masukin variable koneksinya // contohnya $conn / variable yg udh dibuat ama agan $sql = mysqli_query($conn, "SELECT * FROM tb_rm") or die (mysqli_error()); </pre>
0