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?
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’:
$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){ ?>
<?echo '<a href="download.php?f='.$rs->faillampiran.'">'. basename($rs->faillampiran).'</a>';
?><td><?echo '<a href=""> [Remove]</a>';?></td><?
?><br>
<? }
?>
thankz all
For confirm Delete, use this in onclick function()
In a href tag, itself :
In upper Page use javascript like this,
For delete option give the same page link and pass the parameter and get the parameter by get function
In get parameter use like this,