<?php session_start();
include("../../config/config.php");

include("../validateuserlogin.php");

$category =   secureSuperGlobalPOST($_REQUEST[SESS_MASTER.'add_category']);

if($_POST){
      try{
         $user_id=$_SESSION[ADD_TAG.'_UserId'];
         $olgaquerys="INSERT INTO category_add SET category_name='$category' " ;
         //$olgaquerys = $olgaquerys." WHERE s_no='$user_id'";
   
         $stmts = $conn->prepare($olgaquerys);
       echo $olgaquerys;
   		if($stmts->execute()){
          
   			 header("location: ../create-post.php");
   
   			}
      }
       /*error*/
       catch(PDOException $exception){
         die('ERROR: ' . $exception->getMessage());
     }
   }

?>