<?php
error_reporting(0);
session_start();
include '../include/connection.php';
$conn     = db();
@extract($_REQUEST);
$folder='../upload/subdomain/';
$file=time().@str_replace(' ','-',$_FILES['image']['name']);
if(move_uploaded_file(@$_FILES['image']['tmp_name'],$folder.$file))
{
$image=$file;
}
$cat=$_REQUEST['cat'];
// echo $cat;
$subcat=$_REQUEST['subcat'];
$subsubcat=$_REQUEST['subsubcat'];
$all_cat=implode("^",$cat);
$all_subcat=implode("^",$subcat);
$all_finalcat=implode("^",$subsubcat);
$sql="insert into subcontent_tbl set subcontent_cat='$all_cat', subcontent_subcat='$all_subcat', product_subsubcat='$all_finalcat', subcontent_metatitle='".$_REQUEST['Metatitle']."', subcontent_mrtakey='".$_REQUEST['Metakey']."', subcontent_metadesc='".$_REQUEST['Metadesc']."', subcontent_desc='".$_REQUEST['description']."', pg_status='".$_REQUEST['pg_status']."'";
// echo "insert into subcontent_tbl set subcontent_cat='$all_cat', subcontent_subcat='$all_subcat', product_subsubcat='$all_finalcat', subcontent_metatitle='".$_REQUEST['Metatitle']."', subcontent_mrtakey='".$_REQUEST['Metakey']."', subcontent_metadesc='".$_REQUEST['Metadesc']."', subcontent_desc='".$_REQUEST['description']."', pg_status='".$_REQUEST['pg_status']."'";
if(mysqli_query($conn,$sql))
{
// echo "kabir";
$_SESSION['add-page-msg']="Add Successfully";
}
?>
<script>window.location.href='manage-subdomain.php'</script>