1. <?php
  2. include "config/conectar.php";
  3. $id = 0;
  4. $P_C = 0;
  5. $P_V = 0;
  6. if (isset ($_POST["ELIMINAR"]))
  7. {
  8. $id = (int) $_POST["IDS"];
  9. //PROCESO
  10. $sql = "DELETE FROM tbl_productos WHERE id='$id'";
  11. //ejecuta $sql
  12. $obj_conexion->query($sql);
  13. }
  14. ?>
  15. <html>
  16. <head>
  17. <title>ELIMINAR</title>
  18. <!--CSS Bootstrap-->
  19. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  20. </head>
  21. <body>
  22. <nav></nav>
  23. <h2>ELIMINAR PRODUCTO</h2>
  24. <form role="form" name="register" action="eliminar.php" method="POST">
  25. <div class="form-group">
  26. <label for="username">ID</label>
  27. <input type="text" class="form-control" id="IDS" name="IDS">
  28. </div>
  29. <input name = "ELIMINAR" type = "submit" id= "ELIMINAR" value="ENVIAR"/>
  30. </form>
  31. <br /><br />
  32. <a href='index.php'>[INICIO]</a>
  33. </body>
  34. </html>

eliminar