Visitors uploading pictures


I am trying to implement a feature on my website where user’s can upload pictures from their hard disk. I will then place the path to the file in one of my tables for reference.

I currently have this:

My problem is that I do not know what location the file is uploaded to.

Does anyone know the location the file are uploaded to?

Thanks in advance

Assuming you are using PHP, the information you need can be found in the $_FILES array created during the upload process. For example:

$_FILES['userfile']['name'] -- original filename $_FILES['userfile']['tmp_name'] -- path and filename of temporary file $_FILES['userfile']['size'] -- size of file (in bytes) $_FILES['userfile']['type'] -- MIME type of fileTo move it from the temporary location to a new location, create a variable that holds the new path and filename (I’ve used $filename), and use the following:

move_uploaded_file($_FILES['userfile']['tmp_name'], $filename);The file will now be in the new location and renamed, according to whatever you chose for the $filename variable.

Simon Jessey
Keystone Websites | si-blog

Thanks for the response.

I have anohter question, what format is the path to where you want to move the uploaded file too? (and yes I am useing php)

Actually, I got my issue resolved.