diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 68857cf888..5145995920 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -48,7 +48,8 @@ case 'addcat': $cat_name= addslashes(stripslashes(stripslashes($HTTP_POST_VARS['cat_name']))); $category_nicename = sanitize_title($cat_name); $category_description = addslashes(stripslashes(stripslashes($HTTP_POST_VARS['category_description']))); - + $cat = intval($HTTP_POST_VARS['cat']); + $wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')"); header('Location: categories.php#addcat');