I'm trying to upload a file using php. I have a form with input type='file' and I choose the file to upload click to send button.
My HTML code:
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Test Form</title>
</head>
<body>
    <form action="test2.php" method="post" enctype="multipart/form-data">
        <input type="file" name="image1"/>
        <input type="submit" value="send">
    </form>
</body>
My PHP code:
<?php
  move_uploaded_file($_FILES['image1']['tmp_name'],'assets/images/upload/'.$FILES['image1']['name']);
?>
The error in the log file of the apache server is:
PHP Notice: Undefined variable: FILES in ...
Please Could you help me?
 
     
     
     
     
    