
<?php

session_start();
@ob_start();
include "../../config/koneksi.php";

$module=$_GET[module];
$act=$_GET[act];
$act=$_GET[act];
 
// Input YM
if ($module=='cat' AND $act=='add'){
	//$dt1 = date("Y-m-d");
	mysql_query("INSERT INTO gudang(gudang,ket) VALUES('$_POST[gudang]','$_POST[ket]')");
	header('location:data.php');

}

elseif ($module=='cat' AND $act=='edit'){
	mysql_query("update gudang set gudang = '$_POST[gudang]', ket = '$_POST[ket]' where id = $_GET[id]");
	header('location:data.php');

}
elseif ($module=='cat' AND $act=='delete'){
	mysql_query("update gudang set status = 'N' where id = $_GET[id]");
	header('location:data.php');

}

?>
