<div class="content_box">
<div class="right_menu">
<a href="<?php echo $Link; ?>" target="_blank">Visit Page</a>
</div>
<?php /* <a href="#" target="_blank">View Notes</a> */ ?>
<?php 
/////////////// MEASURE 
if (isset ($_SESSION['id'])) { 
$userId = $_SESSION['id'];
$res = mysql_query ("SELECT * FROM user_page WHERE PageId = '$id' AND UserId = '$userId' ");
$nr = mysql_num_rows ($res);
?>
<div class="right_menu">
<?php
if ($nr == 0) { ?>
    <a href="?page=page&id=<?php echo $id?>&mes=add">Add Bookmark</a>
<?php } else { ?>
	<a href="?page=page&id=<?php echo $id?>&mes=rem">Remove Bookmark</a>
<?php } 

} ?>
</div>
</div>