<?php

@ini_set('display_errors', '1');

error_reporting(E_ALL);


$idcategoria = $_GET["idcategoria"];

settype($id, "integer");



$conn = new mysqli("localhost", "catalogo_aion", "aionroot0713", "catalogo_padrao");

// Check connection

if ($conn->connect_error) {

    die("Connection failed: " . $conn->connect_error);

} 







$sql = "delete from categoria where idcategoria = $idcategoria";


if ($conn->query($sql) === TRUE) {

header("Location: https://catalogo44.com.br/gestor/administracaodecategorias.php");

} else {

    echo "Error: " . $sql . "<br>" . $conn->error;

}



$conn->close();



?>