hjælp mig med dette
jeg har følge script. men jeg kan ikke får det til at virke...du kan se fejlen på www.anti-bums.dk/gbog/gboglaes.php
<!-- Minus AutoDato -->
<?php
$db = mysql_connect("hoster","bruger","pass");
mysql_select_db("database",$db);
$limit=10; // How many rows to display on each page
$numresults=mysql_query($db, "SELECT id FROM gbog WHERE id=$id",
$connection);
$numrows=mysql_num_rows($numresults);
if (empty($offset)) {
$offset=0; // Where to start in the list, if nothing's specified.
Default should be '0'
}
// Retrieve your data here
$result=mysql_query("SELECT id FROM gbog WHERE id=$id limit
$offset,$limit");
// calculate number of pages needing links
$pages=intval($numrows/$limit);
// $pages now contains int of pages needed unless there is a remainder from
division
if ($numrows%$limit) {
$pages++;
}
// Generate a nice layout for the links
echo "Page [";
for ($i=1;$i<=$pages;$i++) {
$newoffset=$limit*($i-1);
if ($offset==$newoffset) {
print (" <font color=\"#ff0000\"><b>$i</b></font> \n");
} else {
print "<a href=\"$PHP_SELF?offset=$newoffset\">$i</a>\n";
}
}
echo "]\n<br>\n";
// Display your result data here
?>
