Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/04/2005, 10:51
arameo2010
 
Fecha de Ingreso: diciembre-2004
Mensajes: 156
Antigüedad: 19 años, 4 meses
Puntos: 0
solo expertos

hola tengo este codigo y no se como hacer para validar esos campos! este es el codigo...peroe stan en un arreglo y debo validarlos con php o java script

<?php
$n=0;
do
{
$datoss= $row_Recordset1['id_logistica'];
$id_orden_despacho= $row_Recordset1['id_orden_despacho'];
mysql_select_db($database_corpcasa, $corpcasa);
$query_entrega = "SELECT fecha_op_recep, lugar_or_recep, ne_lugar_or, necasa, recibido, total_re, fecha_op_desp, destino, id_orden_despacho, nota_entrega, despachado, devolucion, desp_real, suma_desp, conductor, cedula, matricula, telefono, inventario FROM entrega WHERE marca = '$datoss'";
$entrega = mysql_query($query_entrega, $corpcasa) or die(mysql_error());
$row_entrega = mysql_fetch_assoc($entrega);
$totalRows_entrega = mysql_num_rows($entrega);
$a= $totalRows_entrega;

if ($a == 0)
{


?>
<tr>
<td class="Estilo14"><?php echo $row_Recordset1['id_orden_despacho']; ?></td>
<td class="Estilo14"><?php echo $row_Recordset1['rubro']; ?></td>
<td class="Estilo14"><?php echo cambiaf_a_normal($row_Recordset1['fecha_planificacion']); ?></td>
<td class="Estilo14"><?php echo $row_Recordset1['centro_acopio']; ?></td>
<td class="Estilo14"><?php echo $row_Recordset1['volumen_planificado']; ?></td>
<td class="Estilo14"><input id="for" name="for[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['fecha_op_recep']; ?>" size="20"></td>
<td class="Estilo14"><input id="lor" name="lor[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['lugar_or_recep']; ?>" size="15"></td>
<td class="Estilo14"><input id="nelo" name="nelo[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['ne_lugar_or']; ?>"></span></td>
<td class="Estilo14"><input id="necasa" name="necasa[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['necasa']; ?>"></td>
<td class="Estilo14"><input id="re" name="re[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['recibido']; ?>"></td>
<td class="Estilo14"><input id="tre" name="tre[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['total_re']; ?>"></td>
<td class="Estilo14"><input id="fod" name="fod[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['fecha_op_desp']; ?>"></td>

<td class="Estilo14"><input id="dest" name="dest[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['destino']; ?>" size="20"></td>
<td class="Estilo14"><input id="ne" name="ne[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['nota_entrega']; ?>"></span></td>
<td class="Estilo14"><input id="desp" name="desp[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['despachado']; ?>"></td>
<td class="Estilo14"><input id="dev" name="dev[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['devolucion']; ?>"></td>
<td class="Estilo14"><input id="despr" name="despr[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['desp_real']; ?>"></td>
<td class="Estilo14"><input id="sum" name="sum[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['suma_desp']; ?>"></td>
<td class="Esti lo14"><input id="cho" name="cho[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['conductor']; ?>" size="20"></td>
<td class="Estilo14"><input id="ci" name="ci[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['cedula']; ?>" size="15"></td>
<td class="Estilo14"><input id="pla" name="pla[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['matricula']; ?>"></span></td>
<td class="Estilo14"><input id="cel" name="cel[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['telefono']; ?>"></td>
<td class="Estilo14"><input id="inv" name="inv[<?php echo $n?>]" type="text" value="<?php echo $row_entrega['inventario']; ?>"></td>
</tr>
<input type="hidden" name="lo[<?php echo $n?>]" value="<?php echo $datoss;?>">
<input type="hidden" name="odd[<?php echo $n?>]" value="<?php echo $id_orden_despacho;?>">



<?php
$n = $n+1;
}
?>
<?

mysql_free_result($entrega);
} while ($row_Recordset1 = mysql_fetch_assoc($result));
mysql_free_result($result);
?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="Estilo30 Estilo31"><a href="../../documentos/MANUAL%20DE%20USO%20DEL%20FORMATO%20A.doc">Bajar Manual de Usuario </a></td>
</tr>
</table>
<p>
<input name="ndatos" type="hidden" value="<?php echo $n?>">
<input type="submit" name="guardar" value="Guardar">
<input type="button" name="reporte" value="Reporte" onClick="javascript: location.href='reporte.php';">
</p>
<p>&nbsp; </p>
</form>