Hi All,
I am trying to create an upload file form that has three fields. the first field will have the user's last name and the second field will be a drop down menu with a couple of selections.
What I want to happen is that when the user clicks on the submit button, I want the file to be uploaded and the file name changed to whatever they had in teh first 2 fields (ie. lastname+dropdownSelection.extension)
Any help is greatly appreciated as I am very new to php.
Rename file upload based on input
Moderator: General Moderators
Re: Rename file upload based on input
Don't see how that is supposed to help me out?
Not trying to move file, I am trying to rename it based on input.
Not trying to move file, I am trying to rename it based on input.
Re: Rename file upload based on input
The move_uploaded_file() function does exactly what you want.
Re: Rename file upload based on input
Renaming a file and moving a file is the same thing.amijic wrote:Not trying to move file, I am trying to rename it based on input.