Delete.php 564 B

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