This topic is locked
[SOLVED]

 File/Image Rename Saved File

11/15/2013 10:56:55 AM
PHPRunner General questions
S
shathcock author

I have a simple question...or at least I hope it is.
I have a table that contains a text field that I am using to store the name of an uploaded file. Everything works great with it and I have even set it up where the files upload to different sub folders depending on the location the user is logged into by modifying the $folder variable. Is there any way just to specify a name that the file is to be saved as on the server.
The user can only upload 1 file and all of the files are the named the same on their computers and I would just like to name it to their username so when an administrator downloads the files he will be able to identify them by their name.
Any help would be greatly appreciated!

Sergey Kornilov admin 11/15/2013

Take a look at this article that explains how you can rename files uploaded to the web server:

http://xlinesoft.com/phprunner/docs/rename_uploaded_file.htm
The username of the current logged user is stored in session variable $_SESSION["UserID"]

S
shathcock author 11/15/2013



Take a look at this article that explains how you can rename files uploaded to the web server:

http://xlinesoft.com/phprunner/docs/rename_uploaded_file.htm
The username of the current logged user is stored in session variable $_SESSION["UserID"]


Hey that works great except for one thing. I had changed the name of the folder based upon the users location in the field and I can't seem to access it from the code snippet.
I also have one other quick question I'll post in a different post.