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

$plan_id = $_GET['plan_id'];
$query = "DELETE FROM stpj 
							WHERE STPJ_ID ='$_GET[id]'
								";

$data = mysqli_query ($koneksi, " select QtyPlan from plan 
							where PlanID = $plan_id");
$row = mysqli_fetch_array ($data);

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

header('Location:stpj.php?id='.$plan_id.'&qty='.$row['QtyPlan']);

?>

