Morthian Posted April 13, 2007 Share Posted April 13, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/46934-automatically-renaming-an-uploaded-file/ Share on other sites More sharing options...
Waldir Posted April 13, 2007 Share Posted April 13, 2007 your going to have to post some of your code, we dont write your code, we help you with what you have written Quote Link to comment https://forums.phpfreaks.com/topic/46934-automatically-renaming-an-uploaded-file/#findComment-228889 Share on other sites More sharing options...
Morthian Posted April 13, 2007 Author Share Posted April 13, 2007 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? =/ Quote Link to comment https://forums.phpfreaks.com/topic/46934-automatically-renaming-an-uploaded-file/#findComment-228913 Share on other sites More sharing options...
MadTechie Posted April 13, 2007 Share Posted April 13, 2007 you set the name during the upload routine you can't create an uploader without setting a name Quote Link to comment https://forums.phpfreaks.com/topic/46934-automatically-renaming-an-uploaded-file/#findComment-228915 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.