File Upload in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mikes1471
Forum Commoner
Posts: 88
Joined: Sat Jan 24, 2009 3:29 pm

File Upload in PHP

Post 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.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: File Upload in PHP

Post by Benjamin »

You are looking for move_uploaded_file();

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