receive fatal error in multiple upload
<p>This code is actually working i have no problem but when my leader ask me to make the upload multiple the problems begins, my leader want to have 2 upload button so that when the user click submit 2 files will be save in the server folder.</p>

<p><strong>indexaa.php</strong></p>

<pre><code>&lt;?php
$smp_id = (int) @$_GET['i'];
$i = $db-&gt;get_row("select * from sample where smp_id='$smp_id'");
?&gt;

    &lt;form name="form" enctype="multipart/form-data" method="post" action="upload.php"&gt;
    &lt;input type="hidden" name="smp_id" value="&lt;? echo $smp_id ?&gt;"/&gt;
        &lt;table class='generic'&gt;
            &lt;tr&gt;&lt;td&gt;Proposal Attachment&lt;/td&gt;&lt;td&gt;&lt;input type='file' name='file' value=''&gt;&lt;/td&gt;&lt;/tr&gt;
            &lt;tr&gt;&lt;td&gt;Proposal Attachment&lt;/td&gt;&lt;td&gt;&lt;input type='file' name='file1' value=''&gt;&lt;/td&gt;&lt;/tr&gt;     
            &lt;tr&gt;&lt;td colspan='2'&gt;
            &lt;input type="submit" value="Submit" class="JSPOPUP_close"&gt;
            &lt;input type="button" value="Close" class="JSPOPUP_close"&gt;
            &lt;/td&gt;&lt;/tr&gt;
        &lt;/table&gt;

    &lt;/form&gt;
</code></pre>

<p>this line of code<code>&lt;tr&gt;&lt;td&gt;Proposal Attachment&lt;/td&gt;&lt;td&gt;&lt;input type='file' name='file1' value=''&gt;&lt;/td&gt;&lt;/tr&gt;</code> ill just add it so that I will have 2 upload buttons. then in upload.php i add this line <code>$file1 = fs_upload($_FILES['file1']);</code> to support the <code>file1</code> and i add this <code>$sm_sql['presentation'] = $file1;</code> so that the <code>file1</code> name will save in my sample table, did i forgot something? <em>note: it is working when it is not multiple upload(1 file upload only)</em></p>

<p><strong>upload.php</strong></p>

<pre><code>&lt;?
include("base_main.php");
$smp_id = (int) $_POST['smp_id'];

$file = fs_upload($_FILES['file']);
$file1 = fs_upload($_FILES['file1']);

$sm_sql['proposal'] = $file;
$sm_sql['presentation'] = $file1;

$insert = insertformat($sm_sql);
$query = $db-&gt;query("update sample set $insert where smp_id='$smp_id'");

if($query){
message_set("File uploaded: &lt;a href='$fileserver_path/dex/$file'&gt;$file&lt;/a&gt;  &lt;a href='$fileserver_path/dex/$file1'&gt;$file1&lt;/a&gt;");
goback();
}
?&gt;
</code></pre>

<p>this is the </p>

<blockquote>
  <p>error: Fatal error: Cannot redeclare class upload in
  C:.....................\class.upload.php on line 363</p>
</blockquote>

<p>Link of <code>class.upload.php</code> <a href="http://www.verot.net/download/class.upload.php/class.upload_0.25.txt" rel="nofollow">http://www.verot.net/download/class.upload.php/class.upload_0.25.txt</a></p>
