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

$kode	= $_POST['kode'];
$exp	= explode("-",$kode);
$kodeop	= $exp[0];
$kodest	= $exp[1];

$sql = mysql_query("SELECT * FROM st_opname WHERE kode_op= '$kodeop' AND kode_st='$kodest'");
$row	= mysql_num_rows($sql);
if ($row>0){
	$input = "DELETE FROM st_opname WHERE kode_op= '$kodeop' AND kode_st='$kodest'";
	mysql_query($input);	
}else{
	echo "Maaf, tidak ada";
}
?>