<?php
session_start();
if (!isset($_SESSION['FirstName'])) {
	die('0');
}

include ('includes/db1config.php');
include ('../includes/mysql_connect.php');

if (isset($_POST) && !empty($_POST)) {
	if (isset($_POST['name']) && !empty($_POST['name'])) {
		$name = trim($_POST['name']);
		$sql = "INSERT INTO blog_categories (
					category_name
				) VALUES (
					'".mysql_real_escape_string($name)."'
				)";
		mysql_query($sql) or die(mysql_error());
		die('1');
	}
}

die('0');
?>