deleteVehicle.php 566 B

1234567891011121314151617181920212223242526
  1. <?php
  2. require "connectionDb.php";
  3. if (isset($_POST['delete']) && !empty($_POST['deleteVid']) ){
  4. $id = $_POST['deleteVid'];
  5. $del = "DELETE FROM vehicle WHERE id='$id'";
  6. $db->exec($del);
  7. echo '<script>window.location.href="customers.php"</script>';
  8. }
  9. ?>
  10. <style type="text/css">
  11. .deleteVForm {
  12. display: none;
  13. }
  14. </style>
  15. <div class="container deleteVForm" id="deleteVForm">
  16. <form action="" method="post">
  17. <input type="number" name="deleteVid" id="deleteVid">
  18. <input type="submit" name="delete" value="OK" class="btn btn-danger">
  19. </form>
  20. </div>