Thread: File upload
View Single Post
Old 02-20-2004, 05:19 PM   #1 (permalink)
NirTivAal
Registered User
 
Join Date: Oct 2003
Posts: 11
NirTivAal is on a distinguished road
File upload

OK, I think I understand this but I'd like to make sure I have it down before I let anyone upload files to my server.

First I have to create a form and use the tag <input type="file" name="something"> (and all those other form tags)

It will get passed on to $_FILES['something']['size' (or name, etc...)]

Now I have to use the function move_uploaded_file($_FILES['something']['size'], $directory) to get it into the correct location.

Also, is there any way that I can reject the file if it's not a jpeg, or convert it to jpeg if it's a wbmp?

Is this stuff all correct?
NirTivAal is offline   Reply With Quote