Laim Posted April 15, 2013 Share Posted April 15, 2013 ~Sorry for topic title, didn't know what to call it.~ Basically, What I want to do is have an image uploader that renames the file to the user's username. For example: If Jeff went to upload his image and on his computer it was called '38483_fbkn.PNG' I want it to rename the file too 'Jeff.jpg' I've done this before but I honestly for the life of me can't remember how I did it. Any help? Also sorry if wrong section, I'm new here Quote Link to comment Share on other sites More sharing options...
lemmin Posted April 15, 2013 Share Posted April 15, 2013 I don't mean to steer you away, but this is covered in many tutorials online. You can follow this tutorial and simply adjust the filename when calling move_uploaded_file(): http://www.tizag.com/phpT/fileupload.php move_uploaded_file(): http://us1.php.net/manual/en/function.move-uploaded-file.php Quote Link to comment Share on other sites More sharing options...
Minato Posted April 15, 2013 Share Posted April 15, 2013 Rename File Upload in PHP Here's another documentation on how to do it. Quote Link to comment 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.