if for example my ID# is 22 for one of my records....i should name my image: 22.gif?
Correct! You will automatically know what the image name is because you know the product ID.
ID# 2365
image file would be: 2365.gif
That way you do not have to store extra information in your database. You do not need to add anything more to your table because the image name is simply the product ID.
If you need multiple sizes of an image, just add something on to the number.
ID# 2365
normal size gif: 2365.gif
thumbnail size: 2365_t.gif
That way you are keeping your naming convention yet can still have multiple sizes of the same image.
An offshoot of this---
I'll do a "check if this file exists" to see if 2365.gif exists on the disk. If it does not exist, change the file name to "nophoto.gif"
That way if you have an item that does not have an image, the GIF link won't be broken-- it will be a default "nophoto.gif"
Let me know if you get the first part before we start coding the second.