brodwilkinson Posted May 9, 2009 Share Posted May 9, 2009 when you upload something it will save here: "upload/filename.ipa" but i want it so there is a submit field (i think) that will allow you to type in a name for it, eg. the file is called "blah" but you type in the form "game" then it changes it to: "upload/game.ipa" with the .ipa being default. Script <?php $path1= "upload/".$HTTP_POST_FILES['ufile']['name'][0]; copy($HTTP_POST_FILES['ufile']['tmp_name'][0], $path1); echo " Download Link, http://teambrod.110mb.com/upload/".$HTTP_POST_FILES['ufile']['name'][0]."<BR/>"; $filesize1=$HTTP_POST_FILES['ufile']['size'][0]; if($filesize1 != 0) { echo "Upload Complete"; } ?> Link to comment https://forums.phpfreaks.com/topic/157530-upload-file-name-edit/ Share on other sites More sharing options...
neogemima Posted May 9, 2009 Share Posted May 9, 2009 Just so I'm clear, the user is inputting a file, but you want them to rename it after they upload it? Why wouldn't they just upload the correct file name? Are you storing the url to the file in a database and then referencing the physically uploaded file stored in a local folder? Check out this tutorial: http://www.phpeasystep.com/phptu/18.html Link to comment https://forums.phpfreaks.com/topic/157530-upload-file-name-edit/#findComment-830605 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.