Hi,

I have a tell-a-friend script that i would images from a MySql DB to appear, but they have to be a repeated region...anyway...here is my code

PHP Code:

$img_source ="http://www.mtl-baseline.com/eng/tellafriend/".$row_sponsors["image"].""; 
$max_width = 50; 
$max_height = 50; 
$new_image_data = resizeImage($max_width, $max_height, $img_source); /* Store results in simple vars */ 
$width = $new_image_data["width"]; 
$height = $new_image_data["height"];

$from = trim($_POST['from']);   
$fromemail = trim($_POST['fromemail']);   
$to = trim($_POST['to']);   
$toemail = trim($_POST['toemail']);   
$subject = "Visit mtl-baseline.com";   
$comments = trim($_POST['comments']);   
$referer = trim($_POST['referer']);
$fromheaders = "MIME-Version: 1.0\n";                             
$fromheaders .= "Content-Type: text/html; charset=iso-8859-15\n"; 
$fromheaders .= "From: \"$from\" < $fromemail >\n"; 
$from = stripslashes($from);   
$fromemail = stripslashes($from);
$to = stripslashes($to);
$toemail = stripslashes($toemail);
$comments = stripslashes($comments);
$referer = stripslashes($referer);
   
$mailcontent = "<style type=\"text/css\">
                a.LinkLINK:visited {color: #CC6600; text-decoration: none;}
                a.LinkLINK:link {color: #CC6600; text-decoration: none;}
                a.LinkLINK:active {color: #CC6600; text-decoration: none;}
                a.LinkLINK:hover {color: #FFFFFF; text-decoration: none;}
                .Verdana12ptsgray {    font-family: Verdana, Arial, Helvetica, sans-serif;    font-size: 12px; font-weight: bold; color: #999999;}
                .Verdana12ptswhite {font-family: Verdana, Arial, Helvetica, sans-serif;    font-size: 12px; font-weight: bold; color: #FFFFFF;}
</style>
<p><table width=\"100%\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#333333\"><tr><td height=\"227\" colspan=\"2\" align=\"left\" valign=\"top\"><img src=\"http://www.mtl-baseline.com/eng/images/tellafriend_ad.gif\" width=\"815\" height=\"227\"></td>
</tr> <tr><td width=\"4%\" align=\"left\" valign=\"top\"><p class=\"Verdana12ptswhite\"><img src=\"http://www.mtl-baseline.com/eng/images/spacer.gif\" width=\"63\" height=\"1\"></p>
    </td>
  <td width=\"96%\" align=\"left\" valign=\"top\"><p class=\"Verdana12ptswhite\">Hey
      $to,</p>
    <p><span class=\"Verdana12ptswhite\"><strong>$from</strong></span> <br>
        <span class=\"Verdana12ptsgray\">went to <a href='http://www.mtl-baseline.com' class='linkLINK'>www.mtl-baseline.com</a> and
        suggests you check out this website.<br>
  Here is the link: <a href=\"$referer\" class='linkLINK'>$referer</a></span> <br>
  <br>
  <span class=\"Verdana12ptswhite\"> <strong>Additional comments by $from:</strong></span><br>
                   <span class=\"Verdana12ptsgray\">$comments</span></p></td>
</tr>
<tr>
  <td height=35 colspan=2 align=\"left\" valign=\"top\"><img src=\"http://www.mtl-baseline.com/eng/images/spacer.gif\" width=\"1\" height=\"35\"></td>
  </tr>
<tr align=center valign=middle>
  <td height=98 colspan=2><p><span class=\"Verdana12ptsgray\">This email was brought to you by aaa</span></p>";?>
<?php do { ?>
<? 
"<img src=\"".$img_source."\"" .$width "\" height=\"" $height "\" alt=\"" ucwords($row_sponsors['name']) . "\">";?>
<?php 
} while ($row_sponsors mysql_fetch_assoc($sponsors)); ?><? 
   
"</td>
  </tr>                            
</table></p>"
;   
mail($toemail$subject$mailcontent$fromheaders); 
?>
there is also the resizeImage.php that is included in this, but it has nothing to do with the do { }while, that's where the problem is.....

Thank you