<?php
 	session_start(); 
	
	if(!isset($_SESSION['linkarisecrm']))
	{
		header('Location: index.php');
	}
		$brmid = $_SESSION['linkarisebranchid'];
$cmpmid=$_SESSION['linkarisecmpmid'];
	
	include("connect.php");

	$uname=$_POST['uname'];
	$uprefix="";

	
	
	 $eve = "INSERT INTO res_unit_master (unitname,cmpmid) VALUES('$uname',$cmpmid)";
	
	
	if ($conn->query($eve) === TRUE)
	{
			
		$_SESSION['msg'] = "Unit Of Measure Addded";
		header('Location: unit.php');
			
	} else 
	{
			
		$_SESSION['msg'] = "Error";
		header('Location: unit.php');
	}


	
?>