Código PHP:
<?
require_once('conexion.php');
$codigo = $HTTP_POST_VARS["code"];
$result = mysql_query('SELECT cli_cod, rec_fec2, rec_fec3, rec_fec4, rec_cod FROM recibos WHERE cli_cod=\'.'$codigo.'\'');
if($row = mysql_fetch_array($result)){
echo '<table width="800" border="0" cellspacing="0" cellpadding="0" style="text-align:left; cursor: pointer; font-family:Arial, Helvetica, sans-serif; font-size:14px" height="36px" onclick="location.href=\'recibo.php\'" onmouseover="pintar(this,\'#F5A9A9\')" onmouseout="pintar(this,\'#FFFFFF\')">
<tr>';
echo '<td width="160" height="50">' . $row['rec_cod'] . '</td>':
echo '<td width="160" height="50">' . $row['rec_fec3'] . '</td>';
echo '<td width="160" height="50">' . $row['rec_fec4'] . '</td>';
echo '<td width="160" height="50">' . $row['rec_fec2'] . '</td>';
echo '<td width="160" height="50" align="center">';
if(. $row['rec_stat'].==1){
echo '<img src="images/yes.gif" alt="si">';
} else {
echo '<img src="images/no.gif" alt="no">';
}
echo '</td>';
echo '</tr>';
echo '</table>';
} else {
echo 'No existe en la base de datos';
}
mysql_free_result($result);
mysql_close($conexion);
?>