33 lines
932 B
PHP
Raw Permalink Normal View History

2021-09-02 08:27:03 -03:00
<?php
session_start();
include_once("..\conexao.php");
$id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);
$result = "SELECT * FROM categoria WHERE id = '$id'";
$resultado = mysqli_query($con, $result);
$row = mysqli_fetch_assoc($resultado);
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>CRUD - Excluir</title>
</head>
<body>
<a href="index.php">Listar</a><br>
<h1>Excluir Categoria</h1>
<?php
if(isset($_SESSION['msg'])){
echo $_SESSION['msg'];
unset($_SESSION['msg']);
}
?>
<form method="POST" action="proc_del_cat.php">
<input type="hidden" name="id" value="<?php echo $row['id']; ?>">
<label>Categoria: </label>
<input type="text" name="nome" placeholder="Digite a categoria" value="<?php echo $row['categoria']; ?>"><br><br>
<input type="submit" value="Confirma exclusão">
</form>
</body>
</html>