Page 1 of 1

File Upload in PHP

Posted: Sat Mar 07, 2009 11:46 am
by mikes1471
Hi Guys

I have used w3schools.com to grasp the concept of File upload using PHP (http://www.w3schools.com/php/php_file_upload.asp)

I've temporarily stored the image (apparently) not sure if this is process that has to be adhered to but I would just like to store images to a dedicated folder in my SQL database and wondered if anyone could help?

Upload_file.php returns a result of:
"Upload: 25-03-08_0904.jpg
Type: image/jpeg
Size: 56.564453125 Kb
Stored in: /tmp/phpDDrXop"

Though this location is foreign to me as it doesnt work as an extention of my URL?

Any help appreciated as I have a new job in Tech Support and am in training at the moment and supporting web designers/developers that use our webspace.

Re: File Upload in PHP

Posted: Sun Mar 08, 2009 12:38 am
by Benjamin
You are looking for move_uploaded_file();

http://us2.php.net/manual/en/function.m ... d-file.php