<?php include('../../config/setup.php');?>
<?php
 if(isset($_POST['promo_code_edit']))
 { 
$editon=date('Y-m-d');
$pid=$_POST['Add_offer_pro_name'];
$cate=$_POST['cate'];
 $tt="update promo_code_master set Promo_code='".$_POST['Edit_Promocode']."',Offer_Percent='".$_POST['Edit_promo_percent']."',Promo_code_valid_upto='".$_POST['Edit_promo_validity']."',Offer_Highlights='".$_POST['Edit_offer_Highlights']."',Terms_and_Conditions='".$_POST['Edit_offer_tc']."',Promo_code_Active_Status='".$_POST['Edit_promo_status']."',cate='$cate',is_ch='".$_POST['prom_status']."',Product_id='$pid' where Promo_id='".$_POST['offer_pro_id']."'";

$update_offer=mysqli_query($config,$tt);
 if($update_offer==false)
{
echo "<script>window.location.href='../promo_code_master.php?erro=0';</script>".mysqli_error();	 
}
else{
	
	echo "<script>window.location.href='../promo_code_master.php?msg=100';</script>";	 

	
}

 }

?>
 