title: Use PHP to display thumbnails as links to images organized in MySQL database
body: <p>I have a folder of images and a MySQL database to manage them. The database has one table: <code>images</code>, and 7 fields: <code>imgID</code>, <code>imgTitle</code>, <code>imgURL</code>, <code>imgDate</code>, <code>imgClass</code>, <code>imgFamily</code>, &amp; <code>imgGender</code>. The primary key is <code>imgID</code> and the Index Key is <code>imgDate</code>.</p>
  
  <p>I wish to display thumbnails of these images on a web page as links to the large versions, using the <code>imgDate</code> to organize them with newest first, and oldest last. The images have the same file names as their thumbnails. The large images are located in <code>new_arrivals_img/</code> relative to the site root, and the thumbnails are located in <code>new_arrivals_img/thumbnails/</code> again relative to the site root.</p>
  
  <p>As I'm new to both MySQL and PHP, I was hoping someone could help me with the code. Everything I have tried has failed.</p>
  
  <p>Right now I'm building the site, and thus using MAMP to host it locally. I have had some problem figuring out relative paths for my images. Is there a way to set <code>new_arrivals_img/</code> as the root?</p>