The code below is a part of my PHP script, which is supposed to display the product image in front of the product info.
Each image is identified by its product_id
. Those IDs which are auto-incremented and received from the MySQL database.
PHP code:
while($row=mysql_fetch_array($result)){
$ProductName = $row['product_name'];
$ProductCat = $row['product_cat'];
$Email = $row['email'];
$ID = $row['product_id'];
//-display the result of the array
echo '<div ><img align="right" src="/project_images/$ID.JPG" width="280" height="125" /></div>';
The images appear corrupted on the browser.
Is it because the images are of the wrong size (possibly too big) or is the code wrong?