jester626 Posted November 18, 2006 Share Posted November 18, 2006 I have the following script[code]<?phpdefine ("NUMCOLS",4);$res = mysql_query("SELECT * FROM TBL_photos");$count = 0;echo "<TABLE border=1>";while (list($col1, $col2, $col3) = mysql_fetch_row($res)) {// if ($count % NUMCOLS == 0) echo "<TR>\n"; # new row echo "<TD><img src=uploads/$col2 /><BR>$col3</TD>\n"; $count++; if ($count % NUMCOLS == 0) echo "</TR>\n"; # end row}# end row if not already endedif ($count % NUMCOLS != 0) { while ($count++ % NUMCOLS) echo "<td> </td>"; echo "</TR>\n";}echo "</TABLE>";?>[/code]I am trying to get some sort of pagination (12 images per page) to work with it but everything I have tried has failed thus far.Can someone give me some pointers on how to make this work?ThanksJester Link to comment https://forums.phpfreaks.com/topic/27682-help-adding-pagination-to-this-script/ Share on other sites More sharing options...
Psycho Posted November 18, 2006 Share Posted November 18, 2006 There is a tutorial on this site. Link to comment https://forums.phpfreaks.com/topic/27682-help-adding-pagination-to-this-script/#findComment-126645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.