Hmmm, well, from what I can understand try this...
<a href='www.mysite.com/index.php?page=1>Link</a>
and at the top of the index.php page...
<?
if ($page == '1') {
//stuff to update db
}
?>
now, when someone clicks link, it loads up the index page, and sets the $page value to be 1, the index page sees this, and updates the db accordingly, another way is of course...
<?
if (isset($page)) {
/
put in stuff to update db, how to update
depending upon the page variable, ie
UPDATE table WHERE something='$page'
/
}
?>
Hope that helps somewhat.