Link to home
Start Free TrialLog in
Avatar of Serellyn
Serellyn

asked on

PHP pagnation

Hello,

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> 

Open in new window


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
Avatar of ploftin
ploftin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Rajesh Dalmia
Rajesh Dalmia
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial