Jump to content

[SOLVED] $_FILES['<path>']['<name>'] not coming up with anything


Recommended Posts

It seems like nothing is going right for me here lol.  I am trying to upload a file from the clients computer to the server.  I have been testing my code for about 2 hours and I cannot figure out why this does not work:

 

original file:

<input type="file" name="txtimage1"/>

 

Upload file:

	
$test = $_POST['txtimage1'];
echo "test " . $test . " \n";

if ($_FILES["txtimage1"]["error"] > 0)
  {
  echo "Error: " . $_FILES["txtimage1"]["error"] . "<br />";
  }
else
  {
  echo "Upload: " . $_FILES["txtimage1"]["name"] . "<br />";
  echo "Type: " . $_FILES["txtimage1"]["type"] . "<br />";
  echo "Size: " . ($_FILES["txtimage1"]["size"] / 1024) . " Kb<br />";
  echo "Stored in: " . $_FILES["txtimage1"]["tmp_name"];
  }

 

test prints out the path that was inputed to txtimage1, but everything else outputs nothing.  Could this be a server side issue or am I missing something?

 

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.