Jump to content

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


tomjung09

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?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.