View Single Post
  #5   Spotlight this post!  
Unread 23-12-2002, 07:18
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Chances are, if you want to do it, the geniuses behind PHP have predicted it.

http://www.php.net/manual/en/ref.dir.php

Use those commands to read all the files in the picture directory. Although if you want to sort them you would have to have some sort of file naming convention that contains the date so your script can tell how to organize it.

One suggestion would be to mix mysql and this directory reading method. Have an admin script that you run everytime you dump a bunch of files in the folder. The script compares the new directory to the current list in the mysql db and adds the new files into the mysql db using the current date and time.