I am a php newbie so please go easy.
I created queries for imgFld and imageFldName. I am trying to find why my images from my db are not being displayed.
I have the below code:
image_show(stripslashes($row['imgFld']),stripslashes($row['imageFldName']));
echo ' '.$records_num;
function image_show($name_image, $alt_tag) {
if (file_exists("mywebsite.co.uk/images/'$name_image'")) {
$img = getimagesize('mywebsite.co.uk/images/'.$name_image);
echo '<img src="mywebsite.co.uk/images/'.$name_image.'" alt = '.$alt_tag.' border=0 align="bottom"';
echo 'width = '. $img[0] .' height = ' .$img[1] . ' />';
} else {
echo 'Add an image here';
}
}
Im getting the image names from a column inside my db and each column has an 'image.jpg', connecting it with the img src script from HTML so that I can display the images from the db.
However no images are being displayed and I cant find the error. Doesnt seem like anything is wrong. When I echo $name_image nothing is produced.