Prev/Next
| From: | Website4S at aol dot com | Date: | Mon, 16 Oct 2000 05:55:54 +0000 |
| Subject: | Prev/Next | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20302@lists.php.net to get a copy of this message | ||
Hi,
I have been searching threads and web sites for help with setting a display
limit and prev/next buttons but I am getting no where. The code I have found
I can`t get to work :/ Does anyone on the list have any suggestions for
adding a limit of 20 results per page and adding the prev/next buttons to the
bottom for the following code ?
<TABLE BORDER="1"
WIDTH="2000"><tr><TH>Delete_User</TH></TR>
<?php
$host="localhost";
$user="";
$passwd="";
$dbase="";
$Selstmt = "SELECT * FROM Member order by Surname";
$dbh=mysql_connect($host, $user, $passwd);
$query=mysql_db_query($dbase, $Selstmt);
$num_rows=mysql_num_rows($query);
for ($i=0; $i<$num_rows; $i++)
{
mysql_data_seek($query, $i);
$array=mysql_fetch_array($query);
printf("<tr><td>%s</td><td>%s</td></tr>",
$array["Surname"]);
}
mysql_close();
?>
</TABLE>
Thanks in advance for any help.
Ade