Let's use your example with the id 1234 and see what happens in different scenarios. I assume that you check where the image name starts with the prodID from the URL.
Scenario 1: You input viewitem.php?prodID=1234 and get all the correct images for the product 1234. No problem here (yet).
Scenario 2: You input viewitem.php?prodID=123 and get all the correct images for the product 123. And you get all images for 1230, 1231, 1232, 1233 and so on. You will get images for 10 products that you didn't want.
Scenario 3: You input viewitem.php?prodID=12 or viewitem.php?prodID=1. You will now receive one hunderd / one thousand product images that you didn't want. A small problem.
Scenario 4: You input viewitem.php?prodID=1234 and get the correct images. But, as your product list grow, you will eventually get a product id 12340. And you have the same problem as in scenario 2 and 3.
Scenario 5: You use regexp to make sure that the character after the prodID is not a number. In other words, if you insert viewitem.php?prodID=12 you will not get products with the number 123, but you will get the image 12back.jpg. Then you get an image that have the name 1231stview.jpg, that belongs to product id 123, and you will get in trouble again.
Scenario 6: You take the time to do as mwasif suggests, and insert the images in a database. When you receive new images you can easily just add them into the database. The same with new products. Boring work, I know, but the problem is solved.
Scenario 7: You write a PHP script that goes through all the images and inserts them into the database automatically. This is a solution that will work pretty well, but it will probably take as long to write the script as it will to actually insert the images automatically. And you still have to check that everything was ok to avoid scenario 5.
Scenario 8: You call the customer / supplier and ask them to insert the image names in the excel file or a XML file. They probably have it in their database already, so it should not be that much work for them. Then you store the image names in the database while reading the file. This is the best solution, no question about it. If it is a supplier they should do it in order to get their products sold; if it is a customer they should do it to cut development costs.
Scenario 9: You use different folders for the different products, then you don't have to do the database work, just read all the files in the folder. Of course, if you want the images presented in some order you should use a database instead.
I won't recommend a single solution since I don't know any details. I just posted this to make you think about the different ways to solve it, and some drawbacks of some solutions.