Thanks, leatherback, for the reply - I appreciate it. I have one question: The code that I included above is part of a while loop, because I want to show multiple images on the page.
I'm selecting the images by a page designator that is set when the image is uploaded, so the select query looks like this:
$query="SELECT * FROM $table WHERE page = 'tools'";
This will give me an array of all fields in the record that I can then use on image.php, but how do I then specify how to echo them out? I can't use an incremented for loop because the id numbers won't necessarily stay at constant increments as images are added and deleted (the client will be adding and deleting items fairly often). Any ideas on this?
Thanks again for your help!