it's working fine after changing a little
<html>
<head> <title> </title></head>
<body>
<form enctype="multipart/form-data" name="upload" action="upload.php" method="post">
<input name="file4upload" type="file"> </input> <br>
// change here at input type
<input name="submit" type="submit" value="Upload File">
</input></br></form>
</body>
</html>
upload.php code:
$target="upload/";
$target_path=$target.basename($_FILES['file4upload']['name']);
if(move_uploaded_file($_FILES['file4upload']['tmp_name'],$target_path))
{
echo " File ".basename($_FILES['file4upload']['name'])."has been uploaded";
}
else
{
echo "Unsuccessful";
}
?>