Delete file using a link
<p>i want to have function like delete file from database by using link instead of button. how can i do that? do i need to use href/unlink or what?
Can i do like popup confirmation wther yes or no. i know how to do that, but where should i put the code?</p>

<p>this is the part how where system will display all filename and do direct upload. Beside each files, there will be a function for 'Remove':</p>

<pre><code>$qry = "SELECT * FROM table1 a, table2 b
       WHERE b.id = '".$rs[id]."' AND a.ptkid = '".$rs[id]."' ";
$sql = get_records_sql($qry);
foreach($sql as $rs){ ?&gt;              
        &lt;?echo '&lt;a href="download.php?f='.$rs-&gt;faillampiran.'"&gt;'. basename($rs-&gt;faillampiran).'&lt;/a&gt;';
        ?&gt;&lt;td&gt;&lt;?echo '&lt;a href=""&gt;      [Remove]&lt;/a&gt;';?&gt;&lt;/td&gt;&lt;?
        ?&gt;&lt;br&gt;  
        &lt;? } 
        ?&gt;
</code></pre>

<p>thankz all</p>
