I am having trouble with an upload form Was previously working but not sure what happened to make it non-functional. When I upload a file with this form:
<form action="http://localhost/index.php/sales/quickadd/" method="post" accept-charset="utf-8" id="quickadd" class="inlineform" enctype="multipart/form-data">
<div class="grid_12">
<fieldset class="formfldset">
<legend>Sales Sheet Quick Add</legend>
<label for="sales_date" style="width: 15em; ">Sales Date</label><input type="text" name="sales_date" value="" id="sales_date" class="datepicker hasDatepicker"><br>
<label style="width: 15em; ">Location</label>
<select id="locations_id" name="locations_id">
<option value="23">Beer Tavern</option></select><br>
<label for="import_file" style="width: 15em; ">Import File</label><input type="file" name="import_file" value="" id="import_file"> - <a href="#" id="guidelines">Import file guidelines</a><br>
<label style="width: 15em; ">Show Import Warnings</label> <input type="checkbox" name="showimportwarnings" checked=""><span class="systemwarning"> -- recommend leaving checked</span><br><br>
<div class="systemwarning">Leaving the import file blank will create a Sales Sheet with all active sales items for the selected location.</div>
</fieldset>
<button name="submit" type="submit" id="submit" value="Add" formnovalidate="formnovalidate" class="" title="Add New Sales Sheet">Add New Sales Sheet</button><br>
</div>
</form>
After submitting the form, I do a var_dump($_FILES) and get an empty array. I am expecting to be able to detect the file and process it. This print statement never gets called.
if($_FILES['import_file']['tmp_name'] != '')
{
echo 'print here';
}
The file is only 2.7kb and the max upload is set to 2MB. I don't get any errors printed out or in apache log files. I have E_ALL error reporting for php. I hope there is something simple that I just forgot. I'm using codeigniter.
TIA