Thank you for your help, I appreciate it. Unfortunately, it didn't work.
Here's what I have so far:
<?
if (@mysql_num_rows($pres))
{
$i = 0;
?>
<?php $var = strstr($link, 'http://') elseif ($var) { ?>
<img src="<?php echo "{$row[picfile]}"; ?>" id="adimg<?php echo $i; ?>" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" alt="<?php echo $ad['adtitle']; ?>">
<?php } elseif { ?>
<table class="adpics" width="100%"><tr><td>
<?
while ($row = mysql_fetch_array($pres))
{
$i++;
$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $images_max_width, $images_max_height);
?>
<img src="<?php echo "{$datadir[adpics]}/{$row[picfile]}"; ?>" id="adimg<?php echo $i; ?>" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" alt="<?php echo $ad['adtitle']; ?>"><br><br>
<?php
}
?>
</td></tr></table>
<?php
$imgcnt = $i;
}
?>
Any ideas? Thanks again.