![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
21/08/2008, 13:56
|
| | Fecha de Ingreso: abril-2008
Mensajes: 151
Antigüedad: 16 años, 10 meses Puntos: 0 | |
Respuesta: Campos Vacios if (isset($_POST['pedido']))
{
?>
<div style="width: 900px; height:420px; background-color: white; border-bottom : 1px solid #cccccc; border-left : 1px solid #cccccc ; border-widht:4px; overflow:auto;">
<?
$depto_ = $_POST['depto'];
$tipomat_ = $_POST['tipomaterial'];
$fecha_ = $_POST['fecha'];
$conn_ = mysql_connect('localhost','root','') or die(mysql_error());
$selec_ = mysql_select_db('jjjjj') or exit();
$query_ = "select * from materiales where categoria = '$tipomat_'";
$consulta = mysql_query("$query_") or die(mysql_error());
if ((mysql_num_rows($consulta)) < 1)
{
echo "No se encontraron resultados, intentelo de nuevo";
}
else
{
?>
<center><h1 style = "color: blue">Solicitud de Utiles</center>
<center><h1 style = "color: blue">Departamento de:<?php echo $depto_?></center>
<center><h1 style = "color: blue">Fecha de Pedido:<?php echo $fecha_?></center>
<body onload="pinta()">
<?
echo "<TABLE BORDER = 10 id = tabla>";
echo "<TR><TH bgcolor=#C0D9D9>Fecha</th><TH bgcolor=#C0D9D9>Categoria</th><TH bgcolor=#C0D9D9>Cod</th><TH bgcolor=#C0D9D9>Descripcion</th><TH bgcolor=#C0D9D9>Unidad</th><TH bgcolor=#C0D9D9>Cantidad</th>";
while($sql = mysql_fetch_array($consulta))
{
echo "<tr>";
echo "<form action = adicionapedido.php method = get>";
echo "<td>".$fecha_."</td>";
echo "<td>".$sql['subcategoria']."</td>";
echo "<td>".$sql['codigo']."</td>";
echo "<td>".$sql['descrip']."</td>";
?><td><input type="text" name="und"></td>
<td><input type="text" name="cant"></td> <?
echo "</form>";
echo "</tr>";
}
?></body><?
}
mysql_close($conn_);
?>
</div>
Los campos und y cant son los que evaluare si deja en blanco porq son los que permito llenar al usuario ya los demas vienen llenos por defecto...... |