xcoderx Posted November 13, 2009 Share Posted November 13, 2009 guys i got this piece o coding and i want to add limit of pages to it could someone guide me through so that i can get it done? im not good at it but im ready to learn so that next time i do not have to ask for help. <?php echo "<center>"; echo "<h2>Images</h2>"; echo "</center>"; $columns = 5; $cardurl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']; function displayCard(){ global $columns; $action = 0; // Open the actual directory if ($handle = opendir("thumbs")) { // Read all file from the actual directory while ($file = readdir($handle)) { if (!is_dir($file)) { if ($action == 0) echo "<tr>"; echo "<td align='center'> <img src='thumbs/$file' width='128' height='128' alt='image' /><br/> <i>Select: </i><input type='radio' name='imagebase' value='$file' /> </td>"; $action++; if ($action == $columns){ $action = 0; echo "</tr>"; } } } echo "</tr>"; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/181408-adding-pagination-guidance/ Share on other sites More sharing options...
mrMarcus Posted November 13, 2009 Share Posted November 13, 2009 what do you mean, "limit of pages"? Quote Link to comment https://forums.phpfreaks.com/topic/181408-adding-pagination-guidance/#findComment-956958 Share on other sites More sharing options...
mikesta707 Posted November 13, 2009 Share Posted November 13, 2009 http://www.phpfreaks.com/tutorial/basic-pagination Quote Link to comment https://forums.phpfreaks.com/topic/181408-adding-pagination-guidance/#findComment-956970 Share on other sites More sharing options...
xcoderx Posted November 13, 2009 Author Share Posted November 13, 2009 i mean add limit of images as in one page i display 15 images and next 15 in another page Quote Link to comment https://forums.phpfreaks.com/topic/181408-adding-pagination-guidance/#findComment-956978 Share on other sites More sharing options...
dropfaith Posted November 13, 2009 Share Posted November 13, 2009 click the link for the pagination tutorial its exactly what you need Quote Link to comment https://forums.phpfreaks.com/topic/181408-adding-pagination-guidance/#findComment-956980 Share on other sites More sharing options...
xcoderx Posted November 13, 2009 Author Share Posted November 13, 2009 i did but that tutorial is with mysql but the coding above is without mysql its dir base Quote Link to comment https://forums.phpfreaks.com/topic/181408-adding-pagination-guidance/#findComment-956981 Share on other sites More sharing options...
xcoderx Posted November 13, 2009 Author Share Posted November 13, 2009 is there no tutorial that is without mysql but only meant for displaying images from a dir with pagination? Quote Link to comment https://forums.phpfreaks.com/topic/181408-adding-pagination-guidance/#findComment-957005 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.