To pass a variable in a url your link would be like so
<a href="http://www.yoursite.com/yourpage.php?rowid=<?php echo $row['ID'];?>">Remove</a>
Doing the function call in the url will have php run that function before it outputs that link. Now if the function doesn't load with that page you just get an error message. But if it does load with that page it could mean the data gets deleted before you even see the option to delete it.
Now on the next page you need to use the get [man]superglobal[/man] to retrieve that variable
if (isset($_GET['rowid'])) {
// do something with $_GET['rowid']
}
Next custom functions can not use any variable that is not passed to it. So in your function "$id" is not defined.
Now your call to the remove_from_DB() function does try to pass the variable but you don't reference it in the function.
function remove_from_DB($id){
// function code here
}
That would allow the $id in the echo and the query to work