Go Back   HTMLCenter Web Development Forums > Web Design and Development > Programming and Scripting

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-16-2008, 12:46 PM
Registered User
 
Join Date: Jul 2004
Posts: 219
paging with for loop

I think I almost figured it out:
PHP Code:
/*
$totalPages=722;
$url_page= $_GET['page'];
$num_pages = 100;
for($thisPage = 1; $thisPage <= $totalPages; $thisPage = $thisPage+$num_pages ){
    $startpage = $thisPage;
}
*/
$num_pages 100;//is the number of html pages inserted in a database per minute because online servers can't do all at once
$totalPages=722;//is the total amount of pages of html that exist
$end_url_page$totalPages/$num_pages;//is LAST page of this file's url. This file will repeat every minute due to the 1 minute rule for online servers with the extension?page=1, ?page=2...
$url_page$_GET['page'];//is PRESENT page of this file's url.
$startpage = (($url_page ) * $num_pages) + 1;//is the present html page to be inserted in the database 
I tried to be as detailed as possible. If there are any more questions let me know thanks!
Reply With Quote

  #2 (permalink)  
Old 07-17-2008, 10:25 AM
Registered User
 
Join Date: Jul 2004
Posts: 219
How do you make it so that if the url has no ?page=1 extension then there has to be an assumption that it is 1?
This didn't work:
PHP Code:
if($_GET['page']==''){
    
$url_page 1;
    }else{
    
$url_page $_GET['page'];
    } 
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
paging recordsets gilgalbiblewhee Programming and Scripting 18 07-03-2008 04:59 PM
paging with JavaScript and ASP "Next" "Previous" gilgalbiblewhee Programming and Scripting 1 07-05-2007 09:19 AM


All times are GMT -5. The time now is 03:47 PM.

 
KickApps
Clicky Web Analytics


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter