initial commit
This commit is contained in:
18
orcamento/proc_del_orcamento.php
Normal file
18
orcamento/proc_del_orcamento.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
session_start();
|
||||
include_once("../conexao.php");
|
||||
|
||||
$id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
|
||||
|
||||
$result= "DELETE FROM orcamentos WHERE id='$id'";
|
||||
$resultado= mysqli_query($con, $result);
|
||||
|
||||
|
||||
if(mysqli_affected_rows($con)){
|
||||
$_SESSION['msg'] = "<p style='color:green;'> Orçamento excluído com sucesso</p>";
|
||||
header("Location: index.php");
|
||||
}else{
|
||||
$_SESSION['msg'] = "<p style='color:red;'> Orçamento não foi excluído</p>";
|
||||
header("Location: edit_orcamento.php?id=$id");
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user