Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions WebServicePHP/deleteVeiculo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

if($_SERVER['REQUEST_METHOD']=='POST' and $_SERVER['HTTP_PATH']=='deleteVeiculo'){
if ($_SERVER['REQUEST_METHOD']=='POST' and $_SERVER['HTTP_PATH']=='deleteVeiculo') {
//Getting Id
$id = $_SERVER['HTTP_ID'];

Expand All @@ -11,15 +11,14 @@
$sql = "DELETE FROM veiculo WHERE id=$id;";

//Deleting record in database
if(mysqli_query($con,$sql)){
if (mysqli_query($con,$sql)) {
echo 'Veículo deletado com sucesso.';
}else{
} else {
echo 'Não foi possível remover este veículo, tente novamente mais tarde.';
}

//closing connection
mysqli_close($con);
} else {
echo 'Acesso não autorizado.';

}
}