Today I have been working on an image upload form so if users are logged into the site, they can upload an image when adding a new product to the website. So far I have managed to get it so the user can click 'browse' to select an image from their computer, click 'open', click 'upload' and then their image is saved into my 'uploaded images' folder and they are told that the upload was successful. Next I need to figure out how to get the image information from that folder and into the products table in my database so the image is also displayed when the data about a product is pulled out of the data and is displayed on the web page. Below is the code I have used so far and screenshots of how it is working at the moment.

Above: Code used

Above: User clicks browse to select an image to upload

Above: The user selects an image from their computer

Above: The selected file is shown here and then the user then clicks 'submit'

Above: The user is then told the file uploaded successfully

Above: The uploaded image in the uploaded images folder
Above: This is the image the user uploaded