<?php 
  require "connectionDb.php";

if (isset($_POST['delete']) && !empty($_POST['deleteVid']) ){

$id = $_POST['deleteVid'];

$del = "DELETE FROM vehicle WHERE id='$id'";

$db->exec($del);

    echo '<script>window.location.href="customers.php"</script>';
}
 ?>
 <style type="text/css">
 	.deleteVForm {
 		display: none;
 	}
 	.deleteVForm span{
 	 	color:red;
  		margin-right: 5px;
	}
	form.deleteVehicleForm.modal-content.animate {
    width: 400px;
    height: 280px;
    margin-left: -15px;
     background-color: #dfe3e6;
	}
	div#deleteVForm {
    width: 400px;
    height: 280px;
    border-radius: 0.5em;
    margin-top: 100px;
	}
		input.btn.btn-default.deleteVehicle {
    background: radial-gradient(#0da3bb, #04161fc2);
    color: #610e14;
    font-family:-webkit-pictograph;
    font-size: 18px;
    margin-right: 20px;
    width: 70px;
	}
	#deleteVid{
		margin-left:100px;
	}

 </style>
<div class="container deleteVForm modal" id="deleteVForm">
	<form action="" method="post" class="modal-content animate deleteVehicleForm">
		<span onclick="document.getElementById('deleteVForm').style.display='none'" class="close" title="Close PopUp">&times;</span>
      	<div class="form-group deleterow">
          <label>Are you sure want to delete?</label>
      	</div>
 		<input type="number" name="deleteVid" id="deleteVid">
	 	<div class="form-group">
		    <div class="col-sm-offset-2 col-sm-10 Vsave"> 
		        <input type="submit" name="delete" value="OK" class="btn btn-default deleteVehicle">
		        <input type="button" class="btn btn-default cancel" value="Cancel" onclick="document.getElementById('deleteVForm').style.display = 'none';">
		    </div>
		</div>
 	</form>
</div>