<?php
 	session_start(); 
	$cmpmid = $_SESSION['linkarisecmpmid'];

	if(!isset($_SESSION['linkarisecrm']))
	{
		header('Location: index.php');
	}
	
	include("connect.php");
	include("removespecial.php");

	$pmid=$_POST['pmid'];
	$categoryname=removespecialchar($_POST['pname']);
	
	
	$eve = "update res_project_master set pname='$categoryname' where pmid=$pmid  and cmpmid=$cmpmid";			
	if ($conn->query($eve) === TRUE)
	{
		$_SESSION['msg'] = "Record Updated";		
	} else 
	{
		$_SESSION['msg'] = "Error";
	}
	header('Location: project.php');	
?>