Jump to content

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? =/

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.