i got this file upload.html where below code resides, and everytime i browse file and submit its failing at isset($_POST). it echoes "didn't upload", its working fine with same file in another folder. all i did was move the whole website folder content to another folder, and it stopped working.
<h3>File Upload:</h3>
Select a file to upload: <br />
<form method="post" action="" enctype="multipart/form-data">
<input type="file" name="file" size="50" />
<br />
<input type="submit" name="uploadxls" value="Upload File" />
</form>
<?php
include("../include/processxls.php");
date_default_timezone_set('America/Chicago');
if (isset($_POST['uploadxls']) && !empty($_POST['uploadxls']))
{
echo "test point";
uploadReport();
}
else
{
echo "didn't upload";
}
function uploadReport()
{
$report=basename($_FILES['file']['name']);
$report=str_replace(' ','|',$report);
$tmppath="uploads/".$report;
if(move_uploaded_file($_FILES['file']['tmp_name'],$tmppath))
{
echo " File upload success. Please wait while report is processed....... ";
processxls($tmppath);
}
else
{
echo "fail";
}
}
?>