below code give me the error when click the submit button
Array ( [submit] => Submit ) Error: 1
but the same code running on diff machine.can any body tell me the what is the problem
<html>
<body>
<form action="" method="post"
enctype="multip art/form-data">
<label for="file">File name:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
<?php
//phpinfo();
if(isset($_POST['submit']))
{
print_r($_POST) ;
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
}
?>
Array ( [submit] => Submit ) Error: 1
but the same code running on diff machine.can any body tell me the what is the problem
<html>
<body>
<form action="" method="post"
enctype="multip art/form-data">
<label for="file">File name:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
<?php
//phpinfo();
if(isset($_POST['submit']))
{
print_r($_POST) ;
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
}
?>
Comment