Guest User

borrarcoche.php

a guest
Dec 12th, 2016
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php
  2. if ($_SERVER['REQUEST_METHOD'] === 'GET')
  3. {
  4. if (isset($_GET['id']))
  5. {
  6. $servername = "localhost";
  7. $username = "root";
  8. $password = "";
  9. $conn = mysqli_connect($servername, $username, $password, "coche");
  10. $sql = "DELETE FROM `coche` WHERE `id`=" . $_GET["id"] . ";";
  11. mysqli_query($conn, $sql);
  12. header('Location: '. "/listarcoches.php");
  13. }
  14. }
  15. ?>
Add Comment
Please, Sign In to add comment