<html>
<link rel="stylesheet" href="css/sin_linea.css">
<?php
include "conectar.php";
$cod=$_GET['id']."";
$sql="select * from producto where codigo='$cod'";
$res=mysql_query($sql,$conec);
while($row=@mysql_fetch_array($res))
{
$ncod=$row['codigo'];
$ndes=$row['descripcion'];
$npre=$row['precio'];
}
?>
<body bgcolor="#00ace6">
<header> <center>
<h3>eliminar productos </h3></center></header>
<form method="post"action="producto_eli.php">
<fieldset>
<legend>
datos del producto
</legend> <table border="1">
<tr>
<td>CODIGO</td><td><input type= "text" name="txcod" id="txcod" value="<?php echo $ncod;?>"></td>
</tr><tr>
<td> DESCRIPCION </td> <td><input type= "text" name="txdes" id="txdes" disabled value="<?php echo $ndes;?>"></td> </tr>
<tr>
<td> PRECIO </td><td><input type= "text"name="txpre" id="txpre" disabled value="<?php echo $npre;?>"></td></tr>
</tr></table >
</fieldset>
<fieldset>
<legend> opciones
</legend>
<button> <input type="submit" value="eliminar"name="e"id="e"> </button>
<button> <a href="man_producto.php">salir</a> </button></fieldset>
<?php
include("conectar.php");
$ecod=$_POST ['txcod'];
if ($_POST['e'])
{
mysql_query("set names 'utf8'");
$insert=("delete from producto where codigo='$ecod'");
$registros=mysql_query($insert,$conec);
echo"<meta http-equiv='refresh' content='1 url=man_producto.php' target='_self'>";
}
?>
</form>
<body>
<style>
TR:HOVER {
background:#EEEEEE;
}
button{
text-align: center;
color: white;
background-color:black; rgb(211, 15, 25);
padding: 5px;
font-size: 18px;
font-family: Impact;
}
header{
background-color: #24282b;
color: #fff;
padding-top: 10px;
min-height: 30px;
border-bottom: 2px solid #1293d4;
}
</style>
</html>
No hay comentarios.:
Publicar un comentario