RyanW67 Posted October 4, 2007 Share Posted October 4, 2007 Hi All, Like my previous post I'm quite a Php noobie, been using a tutorial to make an image uploader, and want to further the uploader so that when it uploads the image the name of that file is assigned to a variable? I've got this... $copy = copy ($_FILES['file']['tmp_name'], "$folder/".$_FILES['file']['name']); $imagename = $_FILES['name']; The first line being when it copies the file from local to my server. I've made up the second line in hope of it working - but it doesn't.... Any ideas? Many Thanks Ryan Link to comment https://forums.phpfreaks.com/topic/71835-solved-assigning-image-name-to-variable-after-upload/ Share on other sites More sharing options...
BlueSkyIS Posted October 4, 2007 Share Posted October 4, 2007 $imagename = $_FILES['file']['name']; Link to comment https://forums.phpfreaks.com/topic/71835-solved-assigning-image-name-to-variable-after-upload/#findComment-361823 Share on other sites More sharing options...
~n[EO]n~ Posted October 4, 2007 Share Posted October 4, 2007 I think it must be <?php $copy = copy ($_FILES['file']['tmp_name'], "$folder/".$_FILES['file']['name']); $imagename = $_FILES["file"]["name"]; // try printing $imagename it shows or not ?> Link to comment https://forums.phpfreaks.com/topic/71835-solved-assigning-image-name-to-variable-after-upload/#findComment-361830 Share on other sites More sharing options...
RyanW67 Posted October 4, 2007 Author Share Posted October 4, 2007 $imagename = $_FILES['file']['name']; THANK YOU Link to comment https://forums.phpfreaks.com/topic/71835-solved-assigning-image-name-to-variable-after-upload/#findComment-361833 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.