l'immagine del ciclo while per quel record.

$query_limit = mysql_query("SELECT * FROM tbl order by id_pro DESC LIMIT $primo, $per_page");
while ($riga = mysql_fetch_array( $query_limit ) )

{
echo("<table border=0 cellspacing=0 width=340 style=border-collapse:collapse>"); echo("<tr>");
echo("<td width=340 style=padding-left:0px>");

echo("<table width=340 height=200 border=0 background=img/sfondo_menu.gif style=background-repeat:no-repeat>");
echo("<tr>");
echo("<td width=150>");

//tabella foto home
echo("<table width=150 border=0>");
echo("<tr>");
if ($riga["watermark"] == "on")
{

$image = "<img src=office/admin_office/img/". $riga["foto1p"] ." border=1>";
$overlay = "<img src=img/affittato.gif>";
//echo $image;
if (!file_exists($image))
{
die("Image does not exist.");
echo "
";
}
$w_offset = 0;
$h_offset = 0;
$extension = strtolower(substr($image, strrpos($image, ".") + 1));
switch ($extension)
{
case 'jpg':
$background = imagecreatefromjpeg($image);
break;
case 'jpeg':
$background = imagecreatefromjpeg($image);
break;
case 'png':
$background = imagecreatefrompng($image);
break;
case 'gif':
$background = imagecreatefromgif($image);
break;
default:
die("Image is of unsupported type.");
}
$swidth = imagesx($background);
$sheight = imagesy($background);
imagealphablending($background, true);
$overlay = imagecreatefrompng($overlay);
$owidth = imagesx($overlay);
$oheight = imagesy($overlay);
imagecopy($background, $overlay, $swidth - $owidth - $w_offset, $sheight - $oheight - $h_offset, 0, 0, $owidth, $oheight);
header("Content-type: image/jpeg");
header("Content-Disposition: filename=" . $image);
imagepng($background);
imagedestroy($background);
imagedestroy($overlay);


//ora qui poi devo stampare l'immagine "fusa"


}else{

echo("<td rowspan=7 align=center style=padding-left:25px;padding-top:0px>");
echo("<img src=office/admin_office/img/". $riga["foto1p"] ." border=1> ");
echo("</td>");
}
}


è che è la prima volta che affronto un argomento simile... sono un po spaesato.

dove sbaglio?

GRAZIE MILLE!!!