session_start(); ?> $selected = 6; include './includes/header.inc.php'; #// Get parameters from the URL //$params = getUrlParams("="); //print "ID=".$_GET['id']."/".; $screen = $_GET['screen']; $rows_per_page=3; // number of records per page $query = "SELECT * FROM MM_Links order by id desc"; $result = mysql_query ($query); $total_records=mysql_num_rows($result); $pages = ceil($total_records / $rows_per_page); // calculate number of pages required if (!isset($screen)) { $screen=0; } $start = $screen * $rows_per_page; // determine start record if(empty($_GET['id'])) { $id=""; $query = "SELECT * FROM MM_Links order by id desc"; } else { $id = $_GET['id']; if ($id == 0) { $query = "SELECT * FROM MM_Links order by id desc"; } else { $query = "SELECT * FROM MM_Links WHERE id=".intval($id); } } $result = mysql_query ($query); if ( mysql_num_rows($result ) == 0) { print "No Link Entry Found"; print $query; include './includes/footer.inc.php'; exit; } $currdescription = mysql_result ( $result, 0, "Ldescription" ); $currtitle = mysql_result ( $result, 0, "Ltitle" ); if ($id == 0) { $currid = 0; } else { $currid = mysql_result ( $result, 0, "id" ); } ?>