Código PHP:
if($res == 0)
{
?>
<script>
location="modificarccp.php";
alert ("ERROR: El # de Comprobante es incorrecto intentelo nuevamente...");
</script>
<?php
}// Fin del if
for($i=0;$i<$res;$i++) //Mostramos los datos de la consulta
{
$data = mysql_fetch_object($respu); //Realiso dos hidden llamados identificacion y password para
//que me guarde los valores y asi pasarlo a los demas formularios.
?>
<input type="hidden" name="anolapso" value="<?php echo $anolapso; ?>">
<input type="hidden" name="meslapso" value="<?php echo $meslapso; ?>">
<input type="hidden" name="anodoc" value="<?php echo $anodoc; ?>">
<input type="hidden" name="mesdoc" value="<?php echo $mesdoc; ?>">
<input type="hidden" name="diadoc" value="<?php echo $diadoc; ?>">
<table id=Table_01 height=18% cellspacing=0 cellpadding=0
width=100% border=0>
<tbody>
<tr>
<td height="24" colspan="2" bgcolor="#FFFFFF"> <div align="left"></div>
<div align="left"><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><img src="../iconos/naranja.gif" width="8" height="9">
# de documento: </strong></font></div></td>
<td width="216" bgcolor="#FFFFFF"><div align="left"><font color="#FF0000"><font color="#333333"><strong><font size="2">
<input name="numdoc" type="text" id="numdoc3" value="<? echo $data->numdoc; ?>" size="5" maxlength="5" readonly="true" validation="numeric" validationHint="required" validationMsg="El campo # Documento es de tipo numerico y obligatorio">
</font><font size="3"></font></strong></font></font><font size="2">
</font></div></td>
<td width="169" bgcolor="#FFFFFF"> <div align="left"><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>
<img src="../iconos/naranja.gif" width="8" height="9"> Tipo documento:</strong></font><font size="2">
</font> </div>
<div align="left"><font size="2"><strong> </strong></font><font color="#FFFFFF" size="3"><strong>
</strong></font></div></td>
<td width="232" bgcolor="#FFFFFF"> <p align="left"><font color="#FF0000"><font color="#333333"><strong><font size="3"><font face="HandelGotDLig" color="#0099FF">
<? echo $data->tipo; ?></font></font></strong></font></font><font color="#FFFFFF" size="3"><strong>
</strong></font><font color="#FFFFFF" size="3"><strong> </strong></font><font color="#FFFFFF" size="3"><strong>
</strong></font></p></td>
<td width="99" bgcolor="#FFFFFF"><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><img src="../iconos/naranja.gif" width="8" height="9">
Planilla: </strong></font><font size="2"> </font><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>
</strong></font><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>
</strong></font></td>
<td width="110" bgcolor="#FFFFFF"><font size="2">
<select name="planilla" id="select" validation="empty" validationhint="required" validationmsg="El campo Tipo es de tipo obligatorio">
<option value="01" <?php if($data->planilla == "01") echo "selected"; ?>>SEMANA1</option>
<option value="02" <?php if($data->planilla == "02") echo "selected"; ?>>SEMANA2</option>
<option value="03" <?php if($data->planilla == "03") echo "selected"; ?>>SEMANA3</option>
<option value="04" <?php if($data->planilla == "04") echo "selected"; ?>>SEMANA4</option>
<option value="05" <?php if($data->planilla == "05") echo "selected"; ?>>SEMANA5</option>
</select>
</font></td>
<td width="1" rowspan=6 bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <div align="right"><font color="#0000FF"></font>
<font color="#0000FF"></font></div></td>
<td width="1" rowspan="6" bgcolor="#FFFFFF"><div align="right"></div></td>
</tr>
<tr>
<td width="155" height="19" bgcolor="#FFFFFF"> <div align="left"><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><img src="../iconos/naranja.gif" width="8" height="9">
Lapso: </strong></font><font size="2"> </font><font color="#FF0000">
</font></div></td>
<td colspan="2" bgcolor="#FFFFFF"><font color="#FF0000"><font size="2"><strong><font size="2"><strong><font color="#FF0000" size="1">
</font><font size="2">
<select name="select" id="select2" validation="empty" validationhint="required" validationmsg="El campo Año Lapso es de tipo obligatorio">
<option value="05" <?php if($data->anolapso == "05") echo "selected"; ?>>2005</option>
<option value="06" <?php if($data->anolapso == "06") echo "selected"; ?>>2006</option>
<option value="07" <?php if($data->anolapso == "07") echo "selected"; ?>>2007</option>
<option value="08" <?php if($data->anolapso == "08") echo "selected"; ?>>2008</option>
<option value="09" <?php if($data->anolapso == "09") echo "selected"; ?>>2009</option>
<option value="10" <?php if($data->anolapso == "10") echo "selected"; ?>>2010</option>
<option value="11" <?php if($data->anolapso == "11") echo "selected"; ?>>2011</option>
<option value="12" <?php if($data->anolapso == "12") echo "selected"; ?>>2012</option>
<option value="13" <?php if($data->anolapso == "13") echo "selected"; ?>>2013</option>
<option value="14" <?php if($data->anolapso == "14") echo "selected"; ?>>2014</option>
<option value="15" <?php if($data->anolapso == "15") echo "selected"; ?>>2015</option>
<option value="16" <?php if($data->anolapso == "16") echo "selected"; ?>>2016</option>
</select>
</font><font color="#FF0000" size="1"> </font></strong></font><font color="#FF0000" size="1">
</font></strong></font><font color="#333333"><strong><font size="2">
<strong><font size="2">
<select name="select" id="select3" validation="empty" validationhint="required" validationmsg="El campo Mes Lapso es de tipo obligatorio">
<option value="01" <?php if($data->meslapso == "01") echo "selected"; ?>>ENERO</option>
<option value="02" <?php if($data->meslapso == "02") echo "selected"; ?>>FEBRERO</option>
<option value="03" <?php if($data->meslapso == "03") echo "selected"; ?>>MARZO</option>
<option value="04" <?php if($data->meslapso == "04") echo "selected"; ?>>ABRIL</option>
<option value="05" <?php if($data->meslapso == "05") echo "selected"; ?>>MAYO</option>
<option value="06" <?php if($data->meslapso == "06") echo "selected"; ?>>JUNIO</option>
<option value="07" <?php if($data->meslapso == "07") echo "selected"; ?>>JULIO</option>
<option value="08" <?php if($data->meslapso == "08") echo "selected"; ?>>AGOSTO</option>
<option value="09" <?php if($data->meslapso == "09") echo "selected"; ?>>SEPTIEMBRE</option>
<option value="10" <?php if($data->meslapso == "10") echo "selected"; ?>>OCTUBRE</option>
<option value="11" <?php if($data->meslapso == "11") echo "selected"; ?>>NOVIEMBRE</option>
<option value="12" <?php if($data->meslapso == "12") echo "selected"; ?>>DICIEMBRE</option>
</select>