-1

I want to get size and tmp_name of selected file but I am getting an error UNEXPECTED T_VARIABLE

HTML:

File: <input type="file" name="file">
<input type="submit" name="submit" value="Upload file">

PHP:

$size = $_FILES['file']['size'];
$tmp_name = $_FILES['file']['tmp_name'];

and when I try to echo $size it dont do anything. Any ideas?

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
Jacob
  • 103
  • 7

1 Answers1

0

You missing form and if not you maybe missing enctype="multipart/form-data" in form

Marty1452
  • 430
  • 5
  • 19