Current location: Hot Scripts Forums » Programming Languages » PHP » Pagination with module system


Pagination with module system

Reply
  #1 (permalink)  
Old 04-04-05, 07:08 PM
Dregon Dregon is offline
New Member
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Pagination with module system

I want to limit the registered members list to 15 per page. The problem i have is the URL is http://teampof.com/index.php?modules=userlist how would i make that work? Here is the code:



// Build Previous Link
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?page=$prev\"><font size=\"2\">Previous</font></a> ";
}

for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i\"><font size=\"2\">$i</font></a> ";
}
}

// Build Next Link
if($page < $total_pages){
$next = ($page + 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next\"><font size=\"2\">Next</font></a>";
}
echo "</center>";




Im having trouble with the navigation links at the bottom. Thanks! (the code is from phpfreaks.com)

The $_SERVER['PHP_SELF'] shows up as index.php.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 flash websites for sale metamorph General Advertisements 5 01-09-05 10:03 PM
what the best email system from the list: vitalik12345 Script Requests 1 10-07-04 10:03 PM
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 06:02 AM
Link system TAK PHP 3 08-17-03 11:17 AM
Good template system [PL]Greg PHP 3 06-28-03 04:09 AM


All times are GMT -5. The time now is 05:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.