Serellyn
asked on
PHP pagnation
Hello,
I've got the following.
and it returns a lot of artistnames, but now I want pagnation.
So when there are more than 20 names, make a new page with link.
more than 40 names, 2 pages with link etc.
I've got the following.
<div class="entry">
<table class="browsetable">
<?php
$getartists_sql = mysql_query("SELECT artistID, artistname FROM artists WHERE artistname LIKE '".mysql_real_escape_string($browse)."%'");
$color = 1;
while($row_browse = mysql_fetch_array($getartists_sql, MYSQL_ASSOC))
{
if($color == 1) {
?>
<tr>
<td class="even"><a href="#" title=""><?php echo stripslashes($row_browse['artistname']); ?></a></td>
<td class="even lyriccount">123 lyrics</td>
</tr>
<?php
$color = 2;
}
else{
?>
<tr>
<td class="uneven"><a href="#" title=""><?php echo stripslashes($row_browse['artistname']); ?></a></td>
<td class="uneven lyriccount">123 lyrics</td>
</tr>
<?php
$color = 1;
}
}
?>
</table>
</div>
and it returns a lot of artistnames, but now I want pagnation.
So when there are more than 20 names, make a new page with link.
more than 40 names, 2 pages with link etc.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.