fputcsv function and Forms
<p>I'm trying to process my Form submit values to a .csv file using the <code>fputcsv</code> function. I'm not getting any errors and no Form values have been saved to the data.csv file. Can anyone see a problem as to what i'm doing wrong?</p>

<p><strong>Form</strong></p>

<pre><code>&lt;label for="location"&gt;How many Locations?&lt;/label&gt; 
&lt;input id="location" name="loc" /&gt;&lt;br /&gt;

&lt;select id="when" name="day"&gt;
    &lt;option value="Sunday"&gt;Sunday&lt;/option&gt;
    &lt;option value="Monday"&gt;Monday&lt;/option&gt;
    &lt;option value="Tuesday"&gt;Tuesday&lt;/option&gt;
    &lt;option value="Wednesday"&gt;Wednesday&lt;/option&gt;
    &lt;option value="Thursday"&gt;Thursday&lt;/option&gt;
    &lt;option value="Friday"&gt;Friday&lt;/option&gt;
    &lt;option value="Saturday"&gt;Saturday&lt;/option&gt;
&lt;/select&gt;
&lt;input type="checkbox" id="osecom" name="osecom" value="Yes" /&gt; 
&lt;label for="osecom"&gt;Online&lt;/label&gt;

&lt;input type="checkbox" id="item1yes" name="item1yes" value="Yes" /&gt; Yes
&lt;input type="checkbox" id="item1no" name="item1no" value="No" /&gt; No&lt;br /&gt;
&lt;label for="chkitem1"&gt;mobile&lt;/label&gt; 

&lt;input type="checkbox" id="item2yes" name="item2yes" value="Yes" /&gt; Yes
&lt;input type="checkbox" id="item2no" name="item2no" value="No" /&gt; No&lt;br /&gt;
&lt;label for="chkitem2"&gt;policy? &lt;/label&gt; 

&lt;input type="submit" title="Submit Form" value="" /&gt;
</code></pre>

<p><strong>php code</strong></p>

<pre><code>if(isset($_POST['submit'])) {

    $data = implode(',', $_POST);
    if( $fp = fopen('data.csv', 'a') ){
        fputcsv($fp, $data);
    }
    fclose($fp);        

}
</code></pre>
