lunes, 1 de agosto de 2016

LLAMAR UN FILA CON UN CRITERIO EN PHP

<!DOCTYPE html>
<html>
<head>
<title>guardar</title>
</head>
<body>
<center>

<?php
include("conexion.php");
$producto=$_POST['producto'];
$query="SELECT *FROM inventarios WHERE producto='$producto'";
$resultado=$conexion->query($query);
$row=$resultado->fetch_assoc();


?>

<CENTER><table border=2 width="200" align=center>
<tr>
<td>id</td>
<td> <input type="text"  name="id"  value="<?php echo $row['id'];?>"/> </td>
</tr>
<tr>
<td>producto</td>
<td> <input type="text" name="producto"  value="<?php echo $row['producto'];?>"/> </td>
</tr>
<tr>
<td>categoria</td>
<td> <input type="text"  name="categoria" value="<?php echo $row['categoria'];?>"/></td>
</tr>
<tr>
<td>fecha</td>
<td> <input type="date" name="fecha"  value="<?php echo $row['fecha'];?>"/></td>
</tr>
<tr>
<td>cantidad</td>
<td> <input type="text"  name="cantidad"  value="<?php echo $row['cantidad'];?>"/></td>
</tr>
<tr>
<td colspan=2 align="center">
<a href="index.html">INICIO</a>
</td>
</tr>
</table>

</CENTER>
</BODY>
</HTML>

No hay comentarios:

Publicar un comentario