<?php include('../../config/setup.php');?>
<?php
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(E_ERROR | E_PARSE);
if(isset($_POST['add_new_sub_cate'])){
    $sub_cate_name = $_POST['sub_cate_name'];
    $main_cate_id = $_POST['main_cate_name'];
    $sub_cate_desc = $_POST['sub_cate_desc'];
    $sql="INSERT INTO  sub_category(Sub_Category_Name,Sub_Category_Desc,Main_Category_sub) VALUES ('$sub_cate_name', '$sub_cate_desc' ,'$main_cate_id')";
    
    if($conn->query($sql) === TRUE){
        echo "<script>window.location.href='../sub_category.php?msg=100';</script>";	 
    }else{
        echo "<script>window.location.href='../sub_category.php?err';</script>";	 
    }
}

 


?>




