<?php
 	session_start(); 

	if(!isset($_SESSION['tulsilogin']))
	{
		header('Location: index.php');
		return;
	}
	
	





$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));

	

	

	include("connect.php");


$packagemid= $_POST['packagemid'];
	
	$packagename=str_replace ("'","\'",$_POST['packagename']);
	$packagename=str_replace ('"','\"',$packagename);
	$pdescription=str_replace ("'","\'",$_POST['pdescription']);
	$pdescription=str_replace ('"','\"',$pdescription);
	$pcurrency=str_replace ("'","\'",$_POST['pcurrency']);
	$pcurrency=str_replace ('"','\"',$pcurrency);
	$pcurrencyrate=str_replace ("'","\'",$_POST['pcurrencyrate']);
	$pcurrencyrate=str_replace ('"','\"',$pcurrencyrate);
	$pcurrencyinr=str_replace ("'","\'",$_POST['pcurrencyinr']);
	$pcurrencyinr=str_replace ('"','\"',$pcurrencyinr);
	
		$countrymid= $_POST['countrymid'];
		$subservicemid= $_POST['subservicemid'];
	
	

	

	 $eve = "update res_package_master set packagename='$packagename',pdescription='$pdescription',pcurrency='$pcurrency',pcurrencyrate='$pcurrencyrate',pcurrencyinr='$pcurrencyinr',countrymid='$countrymid',subservicemid='$subservicemid'  where packagemid='$packagemid'";

	

	if ($conn->query($eve) === TRUE)

	{		

		$_SESSION['msg'] = "package Record Updated succesfully";

		header('Location: countrywisepackage.php');		

	} 

	else 

	{

			

		$_SESSION['msg'] = "Error";

		header('Location: countrywisepackage.php');

	}

?>