-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexclusao_cliente.php
42 lines (35 loc) · 1.53 KB
/
exclusao_cliente.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="pt-br">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
<title>GESTÃO DE VENDAS</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>
<?php
include_once('conexao.php');
//recuperando
$codigo = $_POST['txtid'];
//criando a linha do update
$sqldelete = "delete from cliente where id =$codigo";
//executando instrucão SQL
$resultado = @mysqli_query($conexao, $sqldelete);
if (!$resultado)
{
echo '<input type="button" onclick="window.location='."'index.php'".';" value="Voltar"><br><br>';
die('<b>Query Invalida:</b>' . @mysqli_error($conexao));
}else{
echo '<div class="p-5"><p><b> Registro Excluido com Sucesso </p></b></diV>
<div class="p-5"><a href="index.php" class="btn mx-1 mt-1" style="background-color:darkred; color:white; border-radius: 25px;">Home</a>
<a href="lista_cliente.php" class="btn mt-1" style="background-color: darkred; color:white; border-radius: 25px;">Nova Exclusão</a> </div>';
}
mysqli_close($conexao);
?>
<br><br>
</body>
</html>