uploading files

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
amount
Forum Newbie
Posts: 5
Joined: Wed Aug 20, 2008 6:26 pm

uploading files

Post by amount »

Hello,
I've got several scripts which successfully upload files using various examples on the web. However, they all use <input type='file'.....> as well as S_FILES. I may be dense, but I can't figure out how to upload a file if I don't get the name from the input tag. What do I put as parameters to move_upload()?
Thanks
Tony
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: uploading files

Post by Jonah Bron »

You can check for the existence of the uploaded file with isset().
amount
Forum Newbie
Posts: 5
Joined: Wed Aug 20, 2008 6:26 pm

Re: uploading files

Post by amount »

Thanks, but not quite what I'm asking. In fact, having just written out a detailed explanation of what I'm asking, I've realised what the answer is.
Tony
amargharat
Forum Commoner
Posts: 82
Joined: Wed Sep 16, 2009 2:43 am
Location: Mumbai, India
Contact:

Re: uploading files

Post by amargharat »

If you want to upload files, you need to use filebox i.e.<input type='file' name="file" />.
You can't upload files without it.

when submit the form file gets uploaded into temp folder and then we use move_uploaded_file
Post Reply