Jump to content

Automatically renaming an uploaded file


Morthian

Recommended Posts

I am creating a page to upload files, as well as to submit data about the file to be stored in a database. When the form data is submitted, how can I program it to automatically rename the uploaded file to the ID or Key number of the record in the database in which the file's information is stored? I am rather new to the PHP language, so explanation to the code would be very helpful. Thanks.

Link to comment
https://forums.phpfreaks.com/topic/46934-automatically-renaming-an-uploaded-file/
Share on other sites

I haven't really written it yet because I don't know how to do this. I like to know exactly what I am doing before I do it. Thats just how I am. I don't need anyone to write my code for me; I just want to know how to do this one thing. Is there not just a somewhat simple echo command to set the tmp_name of the file to the id number of the record where all the file's data was just stored? =/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.