I have the following code
index.html
<form action="upload.php" method="POST" enctype="multipart/form-data">
<input type="file" name="test" id="test" class="input"><br>
<input type="submit" value="Go!" class="input btn">
</form>
upload.php
<?php
$x = $_FILES["test"]["name"];
echo $x;
?>
And it returns this
Notice: Undefined index: test in C:\xampp\htdocs\example\upload\upload.php on line 2
I have no idea what's happening here, it all look right to me?
I've seen PHP: "Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset" but that hasn't helped me