I am building a content management system that will track files available for download. Staff members are able to upload their own files from a form. Is there a way to pass the name of the file being uploaded with the rest of the form, as well as actually sending it to the directory? Thanks.
<form action="something.php" method="post" enctype="multipart/form-data"> <input type="file" name="beammeupscotty"> <input type="submit" name="go sucker!"> </form>
then in something.php the filename is $beammeupscotty_name
to save it: http://www.php.net/copy
thanks
another question:
wil the file name be just the name of the file itself, or will it include all the directories, i.e. C:\Documents and Settings\Steve\My Documents... ?
in the copy function, you name it whatever you want to, but no, it won't keep the full path from where you grabbed it on your computer, the _name will merely hold the real file name you uploaded...