input type='file' transfer the value using method='post'
<pre><code>&lt;form name='mainform' method='post' action='do.php?ppc/workload' &gt;
&lt;?php
print "&lt;input type='hidden' name='ppc_m_id' value='$id'&gt;";
print "&lt;table class='clean_form'&gt;";
print "&lt;tr&gt;&lt;td colspan='2'&gt;&lt;b&gt;Attachment&lt;/b&gt;&lt;input type='file' name='file' value=''&gt;&lt;/td&gt;&lt;/tr&gt;";
print "&lt;tr&gt;&lt;td&gt;Remarks&lt;/td&gt;&lt;td&gt;&lt;textarea name='sm_ppc_remarks' style='height:90;width:280'&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;";
print "&lt;/table&gt;";
?&gt;
&lt;input type="submit" value="submit"&gt;
&lt;/form&gt;
&lt;/body&gt;
</code></pre>

<h2>do.php</h2>

<pre><code>class PPC extends CONTROLLER{
    function workload(){
    global $db, $auth;

        $sql['ppc_m_id'] = $_POST['ppc_m_id'];  
        $sql['ppc_remarks_sales'] = $_POST['sm_ppc_remarks'];
        $sql['ppc_sales_attachment'] = fs_upload($_FILES['file']); 

    $insert = insertformat($sql);
    $query = $db-&gt;query("insert into ppc set $insert");

    if($query)
    $db-&gt;query("update sales set sm_ppc_remarks='{$sql['ppc_remarks_sales']}', sm_sales_attachment='{$sql['ppc_dpdate']}' where sm_id='{$sql['ppc_m_id']}' limit 1");

    if($query){
    message_set('Workload has been recorded');
    goback();
    }
    }
    }
</code></pre>

<p>when i filled the remark text area it was save in my data base, but in terms of saving the attchment(input type='file') it doesn't save.. i dont know what is know or something is missing.. thankyou very much</p>
