$title = $_POST['title'];
$get_id = $_GET['id'];
if(isset($_POST['add'])){
$sql = ("INSERT INTO xf_category (title) VALUES (?)");
$query = $pdo->prepare($sql);
$query->execute([$title]);
if($query){
header("Location: ". $_SERVER['HTTP_REFERER']);
}
}