Reputation: 793
I need to set smaller dimensions as all images are different sizes and need one small size so the page does not stretch, however whenever i add width and height dimensions i keep getting php errors.
Just need width and height for img.
while ($res = mysql_fetch_array($action)) {
$output = "<img src=\"../admin/inventory_images/{$res['id']}.jpg\"></img><a href=\"product.php?id={$res['id']}\">{$res['product_name']}</a><br />";
echo $output;
}
Upvotes: 0
Views: 144
Reputation: 219934
Just put them in your <img>
tag as normal:
$output = "<img src=\"../admin/inventory_images/{$res['id']}.jpg\" height=\"100\" width=\"100\"><a href=\"product.php?id={$res['id']}\">{$res['product_name']}</a><br />";
Upvotes: 2