- <?php
- include "config/conectar.php";
- $id = 0;
- $P_C = 0;
- $P_V = 0;
- if (isset ($_POST["ELIMINAR"]))
- {
- $id = (int) $_POST["IDS"];
- //PROCESO
- $sql = "DELETE FROM tbl_productos WHERE id='$id'";
- //ejecuta $sql
- $obj_conexion->query($sql);
- }
- ?>
- <html>
- <head>
- <title>ELIMINAR</title>
- <!--CSS Bootstrap-->
- <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
- </head>
- <body>
- <nav></nav>
- <h2>ELIMINAR PRODUCTO</h2>
- <form role="form" name="register" action="eliminar.php" method="POST">
- <div class="form-group">
- <label for="username">ID</label>
- <input type="text" class="form-control" id="IDS" name="IDS">
- </div>
- <input name = "ELIMINAR" type = "submit" id= "ELIMINAR" value="ENVIAR"/>
- </form>
- <br /><br />
- <a href='index.php'>[INICIO]</a>
- </body>
- </html>
eliminar