|  | Posted by Marlin Forbes on 06/13/94 12:00 
Hi there,
 matpac4@gmail.com wrote:
 > But I need a way of getting the unique id to the file name and am not
 > sure of a way to do this, especially with the problem of when several
 > people are completing the form at the same time. I need to make sure
 > that the number given to the duplicated .php file isn't associated
 > more than once.
 
 When handling uploaded files in PHP, the $_FILES array holds a variable:
 
 $_FILES['userfile']['tmp_name']
 
 The tmp_name is guaranteed to be unique within the folder where the
 temporary uploaded files are stored. You could strip the filename
 portion of that out and use it in your destination folder.
 
 For more details on file uploads and the temp folder handling, see the
 entry under Features/Handling file uploads in the manual.
 
 Or alternately, you can use the php function tempname, detailed under
 Filesystem Functions in the manual.
 
 Regards,
 Marlin Forbes
 Data Shaman
 datashaman.com
  Navigation: [Reply to this message] |