Hi,i have a small problem with the following...
a users posts a vehicle to the database, the form allows for posting with 3 images.
when i display the form using a while loop i need to display the images, my problem is that i want to check 3 images 0r 2 images or 1 image was posted, if 3 was posted then show 3 if 2 was posted then show 2 etc etc,
im new to this so i dont know if i am explaining myself correctly,
my code is bellow
while ($row = mysql_fetch_assoc($query))
{ echo
"<div style='border:solid 1px #cccccc; float:left; width:700px; height:150px; margin:10px;'>
<table cellpadding='0' cellspacing='0' border='0'>
<tr>
<td width='200px'>
<div>
<a href='cars/$row[image1]' rel='lightbox' title='$row[make] $row[model]' ><img src='cars/{$row['image1']}' width='200px' height='150px'; border='0'/></a>
</div>
</td>
<td valign='top' style='padding:0px 5px 0px 0px; font-size:12px; width:280px; background-color:#ffffff;'>
<div style='text-align:left; padding:5px;'>
<div style='text-decoration:underline; font-size:13px; font-weight:bold;'>{$row['make']} {$row['model']}</div>
<div style='height:108px; padding-top:2px;'>{$row['description']}</div>
<div>Price: R.{$row['price']} | Colour: {$row['color']} | Year: {$row['yearmodel']}</div>
</div>
</td>
<td width='120px'>
<!-- here i need to first check if the variable $row[image2] contains an image other was its shows that icon of no image found -->
<img src='cars/$row[image2]' width='120px' height='90px'; border='0'/>
</td>
<td width='120px'>
<!-- here i need to first check if the variable $row[image3] contains an image other was its shows that icon of no image found -->
<img src='cars/$row[image3]' width='120px' height='90px'; border='0'/>
</td>
</tr>
</table>
</div>";
}
i will really appreciate any assistance as i am trying to build my first site, wish me luck!