<?php
session_start();
include "../../config/koneksi.php";

$module=$_GET[module];
$act=$_GET[act];

// Update golongan
if ($module=='golongan' AND $act=='update'){
    mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE golongan SET golongan  = '$_POST[golongan]'
								 WHERE  id_golongan     = '$_POST[id]'");
	
  header('location:../../media.php?module='.$module);
}
elseif ($module=='golongan' AND $act=='hapus') {
	mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM golongan WHERE id_golongan='$_GET[id]'");
  header('location:../../media.php?module='.$module);
}
elseif ($module=='golongan' AND $act=='input'){
	  mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO golongan(golongan) 
	  VALUES('$_POST[golongan]')");
  header('location:../../media.php?module='.$module);
}

?>

