I hastily wrote this in a flurry of confusion. My apologies. Let me clarify. The first form I created inserts a new row to the 'properties' table with a new description, title, address, price, etc (everything but images). This form is processed, the data is inserted and the user is redirected to a new page, where they upload the first five photographs to the server, and the location of these files is inserted in the 'ImagesMain' table. On this page there is also a form element that asks them how many additional photographs they will add along with the first five--this is passed to the next page.
This last page has a form that allows the user to upload the amount of images they specified in the last page. These images are uploaded to the server and the location of these files are inserted in the 'images' table. However the 'images' database has multiple files with the same primary key from the 'properties' table, so I cannot just autoincrement this number. I don't want the second 'ImagesMain' table to autoincrement the Primary Key because there may come a time when someone wants to add a listing with no images. So I want to have the autoincrementing number from the first page passed to the second and third page and I do not know how.
FYI I created the 'images' table this way because originally, I added 30 images into a web page that got their link from this table, and found that when I had less than 30 images in the database, the web page indicated that it had a missing image. Also, there may come a time when I will need to have more than 30 images. So now, if I have 10 images for property '1,' in the 'images' table, these images all have the PropertyID '1'. If there is a better way to do this, please let me know.
I've picked up a PHP, MySQL, Apache book, so hopefully I'll be on the other end of this forum soon. I really appreciate the help I've received here.