I am building a website where models and photographers can regsiter a profile. During registration I am wanting to allow a maximum of 6 images to be uploaded. However, I want to either append the file name with the name of the user, so the image stored on the server will be called
$USERID_<photo file>.<ext>
or create a folder on the fly to store the images in so the location will be
<UPLOAD LOCATION>/$USERID/<photo file>.<ext>.
The USERID, file location and file name also need to be stored in MySQL.
I have a script which I have borrowed from a tutorial, and I have tested this script and it works, allowing me to upload a single image to a pre-defined location and store the data in MySQL. But I need to change the script to allow for the above [max 6 images, and renamed file or location].
Note: register_globals is OFF.
Can anyone help me please? If you know of a good script or if you can point me in the direction of a tutorial which covers all of this I would be very grateful. I am new to PHP and MySQL but I want to learn. I can post the files I have from the tutorial if this helps.
For reference, I am also wanting to create a profile page on the fly [i.e. have a page created immediately after registration where the details entered are displayed for each member], and the ability to search the database. I mention this in case there is a total solution, but I want to deal with and learn one thing at a time, so my question is only for the image upload problem.