<?php
session_start();
include "lib/dbcon.php";

$category = mysqli_real_escape_string($con,$_POST['category']);
$sub_category = mysqli_real_escape_string($con,$_POST['sub-category']);


$sub_data = "insert into sub_category(category,sub_category) values ('$category','$sub_category')";
 if (mysqli_query($con,$sub_data)) {
	$_SESSION['msg_scs'] = 'Data Updated...';
	header("location: sub_category.php");
} 
else {
	$_SESSION['msg_err'] = 'Something Went Wrong Try Later..';
	header("location: sub_category.php");
}

?>