PHP $_FILES empty on load
<p>for some reason I can't get the $_FILES array to include the upload as selected on my form.  From what i have read the form looks ok, and all the other variables are received just fine.</p>

<p>Each time I submit the form the var_dump for the $_FILES array has 0 entries.</p>

<p>For this post i have removed the other fields for the sake of brevity since they are working.</p>

<pre><code>&lt;form name="addFact" id="addFact" action="add_fact.php" method="post" enctype="multipart/form-data" onsubmit="return validateStatus();" &gt;
    &lt;input type="file" id="myImage" name="myImage" style="width:450px;"/&gt;&lt;br /&gt;
&lt;/form&gt;
</code></pre>

<p>And after I reload I use the following to check the $_FILES array:</p>

<pre><code>echo "- Files - &lt;br&gt;\n";
echo "&lt;pre&gt;\n";
var_dump($_FILES);
echo "&lt;/pre&gt;\n";
</code></pre>

<p>but the result is empty every time:</p>

<p>Files: 
array(0) {
}</p>

<p><strong>Update</strong>
sorry, didnt realize validate status was still in there .. but this is the JS that checks whether to submit the form or not</p>

<pre><code>function validateStatus() {
    jQuery("#addFact").validationEngine({scroll: false});
    var valid = $("#addFact").validationEngine('validate');
    if (valid == true) {
        submitForm('addFact');
    }
    return false;
}
</code></pre>

<p>Though I doubt that is part of the issue as the form submits successfully with all attributes still set including the file field , etc.</p>

<p>oh ..and lol .. another function .. :) ... here is the submt form function:</p>

<pre><code>function submitForm(formName,message) {
    $.ajax({
        data: $("#" + formName).serialize(),
        type: $("#" + formName).attr('method'),
        url: $("#" + formName).attr('action'),
        success: function(response) {
            $('#load_target').html(response);
        }
    });
    return false;
}
</code></pre>

<p>load_target is the div on the index page I am loading this php file into with ajax. - hope that is all clear now :)</p>

<p>Also, to belay any conrens of the form not posting anything .. here are the results for the post var_dump</p>

<pre><code>array(11) {
  ["action"]=&gt;  string(4) "save"
  ["category"]=&gt;  string(1) "3"
  ["startDate"]=&gt;  string(10) "09-27-2012"
  ["expireDate"]=&gt;  string(10) "11-27-2012"
  ["title"]=&gt;  string(10) "Test Title"
  ["subtitle"]=&gt;  string(10) "Test Title"
  ["include_image"]=&gt;  string(3) "yes"
  ["img_loc"]=&gt;  string(4) "left"
  ["img_size"]=&gt;  string(2) ".3"
  ["scroll"]=&gt;  string(1) "1"
  ["fact_text"]=&gt;  string(27) "there's something about her"
}
</code></pre>
