copy($_FILES['userfile']['tmp_name'],"/real/path/to/$_FILES['userfile']
['name']");

what you really want is...
http://www.php.net/manual/en/features.file-upload.php

hth
jeff


                                                                                       
                             
                    "Info@Best-IT"                                                     
                             
                    <info                To:     <[EMAIL PROTECTED]>                
                             
                                         cc:                                           
                             
                    01/01/2003           Subject:     [PHP-DB] Renaming a file 
uploaded by a form.                  
                    06:25 PM                                                           
                             
                                                                                       
                             
                                                                                       
                             




I have a script that uploads form data to a MySQL server then emails the
form data to alert people that an upload occurred.

I am having trouble getting the form to upload my file with the actual
filename.  The filename seems to be created by the PHP machine (wild guess)
but it looks like this:

/var/tmp//phptkYxkV

Any ideas on how to get it to look like: filename.doc  would be greatly
appreciated.

/Tim


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to