Seguidores

martes, 15 de octubre de 2019

ELIMINAR

<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-aligncenter;
                colorwhite;
                background-color:black; rgb(211, 15, 25);
                 padding5px;
                 font-size18px;
                 font-familyImpact;
            }
            header{

background-color#24282b;

color#fff;

padding-top10px;

min-height30px;

border-bottom2px solid #1293d4;



}
    </style>

</html>

No hay comentarios.:

Publicar un comentario

netbeans java

LEJGUAJE DE PROGRAMACION I Ejercicios sobre operadores aritméticos Java Ejercicio 1: Si a, b y c son variables enteras con valores a=8, b=...