Uploading image.?

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
kaukab
Forum Newbie
Posts: 5
Joined: Tue Nov 18, 2008 12:13 am

Uploading image.?

Post by kaukab »

Hello All

i want to upload a picture on local server which is install on my local machine
i have a code which is in html with few lines of php.
this code can select the image from a local machine through <input type="file" > and then it go to database through insert INTO Statement.
butt it doesn't upload on the server in www folder
and one give me a favour and tell me how can i figure out this problem



ok
bye
Thanks in advance
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Uploading image.?

Post by requinix »

You have to move the file where you want it manually. Something like

Code: Select all

move_uploaded_file($_FILES["input"]["tmp_name"], "/path/to/upload/directory");
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Uploading image.?

Post by aceconcepts »

This is quite a straightforward tutorial: http://www.tizag.com/phpT/fileupload.php
Post Reply