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 Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 4, 2007 Share Posted October 4, 2007 $imagename = $_FILES['file']['name']; Quote Link to comment 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 ?> Quote Link to comment Share on other sites More sharing options...
RyanW67 Posted October 4, 2007 Author Share Posted October 4, 2007 $imagename = $_FILES['file']['name']; THANK YOU 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.