hi i have a following form in html:
<form action="upload_file.php" method="post" enctype="multipart/form-data"> File Name: <input type="file" name="file" id="file" /> <br /> <input type="submit" name="submit" value="Submit" /> </form>
and here is my upload_file.php
if (($_FILES["file"]["type"] != "file/XML"))
{
echo "Invalid file type";
}
else
{
echo 'file is uploaded';
}
it give Invalid file type
i want to upload a file of .xml
help me in this regard