put the info at these two pages together: http://www.jonhaworth.com/articles/php/list-files-in-directory http://www.php-mysql-tutorial.com/php-mysql-upload.php also, you'll want to use the imagecopyresized function from php http://cn.php.net/manual/en/function.imagecopyresized.php to generate thumbnails to put in the database as you do this.