This is what you may do :
- Create ur table,make the "id" become "auto_increment"
- Check out this to make sure u get rid of upload multiple files :
http://www.php.net/manual/en/feature...d.multiple.php
- write ur scripts to upload,now u dont have to have a hidden ID,because it increase automatically in step 1
- after the scripts done uploading,extract the urls from 2 images that have been uploaded before(use PHP string functions)
- write all u need to the database (comment,pic1 url,pic1,pic2 url,pic2)
In case u meaned upload images into database,i have no idea because i`ve never do such things,but it's able to do it

-