i have a form to add new entries and then a seperate page for the entries. the entries page is below. but what if i only want 10 entries per page? how do i do that?
<?
$db_name = "blackfly";
$table_name = "my_music";
$connection = @mysql_connect("db.blackfly.f2s.com", "xyz", "xyz") or die("Couldn't connect.");
$db = @mysql_select_db($db_name, $connection) or die("Couldn't connect.");
$sql = "SELECT * FROM $table_name ORDER BY date_acq DESC";
$result = @($sql,$connection) or die("Couldn't execute query.");
while ($row = mysql_fetch_array($result))
{
$id = $row['id'];
$format = $row['format'];
$title = $row['title'];
$artist_fn = $row['artist_fn'];
$artist_ln = $row['artist_ln'];
$rec_label = $row['rec_label'];
$my_notes = $row['my_notes'];
$date_acq = $row['date_acq'];
if ($artist_fn != "") {
$artist_fullname = trim("$artist_fn $artist_ln");
} else {
$artist_fullname = trim("$artist_ln");
}
if ($date_acq == "0000-00-00") {
$date_acq = "[unknown]";
}
$display_block .= "<P><strong>$title</strong> ($artist_fullname)<br>$my_notes <em>(acquired: $date_acq, format: $format)</em></P>";
}
?>
<body>
<H1>My Music</H1>
<? echo "$display_block"; ?>
<P><a href="my_menu.html">Return to Menu</a></P>
</body>