I'm new to PHP and I wrote a simple code in PHP for file upload.but my code gives me an error.can someone help me to find the error
here is my code
error gives as Undefined index
<?php
$name=$_FILES["file"]["name"];
$size=$_FILES['file']['size'];
$type=$_FILES['file']['type'];
?>
<form action="unset.php"method="POST">
<input type="file" name="file"><br><br>
<input type="submit" value="submit">
</form>