When a customer is viewing any given product page, under the product picture, I have a little magnifying glass along with the text "Click here to view a larger image".
Now, currently, for EACH product, I have a field in the database that says whether or not a product has a larger image on file.
So then on the products.php page, I just do a little if statement to check what the value is of that field. If it is a "y", then I code the site with the magnifying class and the appropriate text. Otherwise, nothing is shown underneath the image.
My question is, is there a way for PHP to do this for me instead of having to keep track, in a database, of whcih products have larger images, and which do not?
Can php somehow do a quick check on the server for a given file, and if it is there, do some code. If not, do something else...or in my case, do nothing?
Thanks.