think this should do you
where you want add in
userdetails.php
Code:
<tr><td class=rowhead width=1%>Flush Torrents</td><td align=left width=99%><?print("<h0>Flush Torrents, <a href=takeflush.php?id=$id>click here</a>!</h0>\n");?></td></tr>
takeflush.php
Code:
<?
require_once("include/bittorrent.php");
dbconn();
loggedinorreturn();
$id = 0 + $_GET["id"];
mysql_query("DELETE FROM peers WHERE userid = $id");
header("Refresh: 0; url=userdetails.php?id=$id");
?>