<?php
include "../koneksi.php";

$plan_id = $_GET['id'];
$notif = $_GET['notif'];

$data = mysqli_query ($koneksi, " select plan.Pbb_Conf
										from plan
										WHERE plan.PlanID = '$plan_id'");
$row = mysqli_fetch_array ($data);

if($row['Pbb_Conf']==NULL) {
	$query = "UPDATE plan SET
						Pbb_Conf = '0'
						WHERE planID ='$plan_id'";

	mysqli_query($koneksi, $query)
	or die ("Gagal Perintah SQL".mysql_error());
} else {
$query = "UPDATE plan SET
						Pbb_Conf = NULL
						WHERE planID ='$plan_id'";

mysqli_query($koneksi, $query)
or die ("Gagal Perintah SQL".mysql_error());	
}

header('Location:../dashboard/notif.php?id='.$plan_id);

?>


