initial commit
This commit is contained in:
17
cliente/proc_del_cliente.php
Normal file
17
cliente/proc_del_cliente.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
session_start();
|
||||
include_once("../conexao.php");
|
||||
$id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
|
||||
|
||||
$result = "DELETE FROM tbclientes WHERE id='$id'";
|
||||
$resultado = mysqli_query($con, $result);
|
||||
|
||||
if (mysqli_affected_rows($con)) {
|
||||
$_SESSION['msg'] = "<p style='color:green;'>Cliente excluido com sucesso!</p>";
|
||||
header("Location: index.php");
|
||||
}else{
|
||||
$_SESSION['msg'] = "<p style='color:red;'>Cliente não foi excluido</p>";
|
||||
header("Location: edit_cliente.php?id=$id");
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user