<?php
if (isset($_POST['submit'])){
$file_name = $_FILES['fileToUpload']['name'];
$file_type = $_FILES["fileToUpload"]["type"];
$tmp_path = $_FILES["fileToUpload"]["tmp_name"];
$path = 'uploads/'.$file_name;
move_uploaded_file($tmp_path, $path);
}
?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> File Upload </title>
</head>
<body align = "center">
<h1>File Upload</h1>
<form method="POST" action="" enctype="multipart/form-data">
<LABEL> Upload Your Image Here:</LABEL>
<br>
<input type="File" name="fileToUpload">
<br>
<input type="submit" name="submit" value="Upload">
</form>
</body>
</html>