<?php 

$PID = "master_menu";
session_start();
require_once("../lib/dbconn.php");

//echo "<pre>";
//echo print_r($_POST);
//echo "</pre>";

$id = $_POST[id];
$s = count($id);
for ($i = 0; $i <= $s-1; $i++) {
    mysql_query("insert into tbl_group_menu (kode_menu, kd_group_user) values ($id[$i], $_POST[gr])");
}

echo "<script language='JavaScript'>document.location='../index2.php?p=$PID&gr=$_POST[gr]'</script>";
?>
