Hi all,
Can anyone find what's wrong with the following script. It dispalys the results but the Next link is not a link. Any ideas?
<?
if(!isset($start)) $start = 0;
$link = mysql_connect('localhost', 'username', 'password');
mysql_select_db('psp');
$query = "SELECT * FROM members LIMIT " . $start . ", 10";
$result = mysql_query($query); //you should do error checking
while($row = mysql_fetch_array($result)){
echo "{$row['email']}<br>\n";
}
$query = "SELECT count(*) as count FROM members";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$numrows = $row['count'];
if($start > 0)
echo "<a href=\"" . $PHP_SELF . "?start=" . $start - 10 . "\">Previous</a><BR>\n";
if($numrows > ($start + 10))
echo "<a href=\"" . $PHP_SELF . "?start=" . $start + 10 . "\">Next</a><BR>\n";
?>