Jump to content

[SOLVED] Assigning image name to variable after upload


RyanW67

Recommended Posts

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
Share on other sites

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.