</style>

<?php
include_once("../header.php");
include_once("../php/config.php");
$s = mysql_query("select * from productos where id_producto='".$_GET['id']."'") or die(mysql_error());

   $foto = "";
   $foto = @mysql_result($s, 0,'foto');
   if($foto==""){$foto="thumbnail2.png";}
?>


<style>
  .form-control{
    font-size: 20px;
  }


b{
    font-size: 18px;
  }

  th{
    font-size:20px;
    text-align: left;
  }

    td{
    font-size:18px;
  }
</style>

<div class="container">
    <form action="grabar_foto.php" method="POST" id="frm" enctype="multipart/form-data">

             <div class="row mb-2">
                             
                                <div class="col-sm-10">
                                   <img src="<?php echo $foto;?>" class="img-thumbnail" width="145" height="150">
                                </div>
                   
                    </div>
                     <div class="row mb-2">
                                <div class="col-sm-2"><label class='text-dark'>Foto</label></div>
                                <div class="col-sm-10">
                                    <input value="<?php echo @mysql_result($s, 0,'foto')?>" type="file" readonly  class="form-control" name="foto">
                                </div>
                      </div>

                       <div class="row mb-2">
                                <div class="col-sm-2"><label class='text-dark'>Producto</label></div>
                                <div class="col-sm-10">
                                    <input value="<?php echo @mysql_result($s, 0,'descripcion')?>" type="text" readonly  class="form-control" name="descripcion">
                                </div>
                      </div>

                       <div class="row mb-2" style="display:none">
                                <div class="col-sm-2"><label class='text-dark'>Producto</label></div>
                                <div class="col-sm-10">
                                    <input value="<?php echo @mysql_result($s, 0,'id_producto')?>" type="text" readonly  class="form-control" name="id">
                                </div>
                      </div>
					    <div class="row mb-2" style="display:none">
                                <div class="col-sm-2"><label class='text-dark'>Producto</label></div>
                                <div class="col-sm-10">
                                    <input value="<?php echo @mysql_result($s, 0,'codigo')?>" type="text" readonly  class="form-control" name="codigo">
                                </div>
                      </div>

                      <hr>
                      <button class="btn btn-success" name="btn_grabar"><i class="bi bi-save"></i>  Actualizar foto</button>

                     
  </form>

</div>

  <?php
  include_once("../footer.php");

 ?>

