query("SELECT * FROM kategori_layanan WHERE nama = '$kategori'");
if(mysqli_num_rows($cek_kategori) > 0){
}else{
$input_kategori = $conn->query("INSERT INTO kategori_layanan VALUES ('','$kategori','$kategori','Sosial Media')");
}
$cek_layanan = $conn->query("SELECT * FROM layanan_sosmed WHERE provider_id = '$id_provider' AND provider = ZAYNFLAZZ'");
$data_layanan = $cek_layanan->fetch_assoc();
if(mysqli_num_rows($cek_layanan) > 0) {
echo "Layanan Sudah Ada Di database => $layanan | $id_provider \n
";
} else {
$sid = $no++;
$insert_layanan = $conn->query("INSERT INTO layanan_sosmed VALUES ('','$sid' ,'$kategori' ,'$layanan' ,'$catatan' ,'$min' ,'$max' ,'$harga', '2000', 'Aktif' ,'$id_provider' ,'ZAYNFLAZZ' ,'Sosial Media')");
if($insert_layanan == TRUE){
echo "===============================
Input Layanan Sukses
Kategori : $kategori
SID : $sid
Layanan : $layanan
Min :$min
Max : $max
Harga : $harga
Note : $catatan
===================================
";
}else{
echo "Gagal";
}
// echo $no++." ";
}
}
?>