NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP Help - I must be over looking something

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 07-30-2007, 12:56 PM THREAD STARTER               #1 (permalink)
jdk
Senior Member
 
jdk's Avatar
Join Date: Jul 2004
Location: Florida
Posts: 1,492
jdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond repute
 



[RESOLVED] PHP Help - I must be over looking something


I have been staring at this since last night and for some reason I must be overlooking something. I have had no problems in the past but for some reason this one is has me stumped.

Code removed b/c project has not officially been released I am working on.
Last edited by jdk; 07-30-2007 at 07:44 PM. Reason: RESOLVED
jdk is offline  
Old 07-30-2007, 07:36 PM   #2 (permalink)
cef
NamePros Regular
Join Date: May 2004
Location: NYC
Posts: 236
cef is a jewel in the roughcef is a jewel in the roughcef is a jewel in the rough
 


Animal Rescue
Replace this line

PHP Code:
                                    $pageprev $page=$page-1
With this
PHP Code:
                                    $pageprev $page-1
????: NamePros.com http://www.namepros.com/programming/355881-php-help-i-must-over-looking.html
and
PHP Code:
                                    $pagenext $page=$page+1
With this
PHP Code:
                                    $pagenext $page+1
????: NamePros.com http://www.namepros.com/showthread.php?t=355881
In both cases you're inadvertently setting $page in the code along with $pageprev and $pagenext.

Note that the second case ($pagenext) doesn't manifest an error for you because you no longer access the $page variable after that code. But it's a logic error nonetheless, and one day you might just need to access $page somewhere after creating the prev/next links.
cef is offline  
Old 07-30-2007, 07:43 PM THREAD STARTER               #3 (permalink)
jdk
Senior Member
 
jdk's Avatar
Join Date: Jul 2004
Location: Florida
Posts: 1,492
jdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond repute
 



Thanks I also had to remove the
PHP Code:
$page++; 
I must have added in there.
jdk is offline  
Old 07-30-2007, 08:02 PM   #4 (permalink)
cef
NamePros Regular
Join Date: May 2004
Location: NYC
Posts: 236
cef is a jewel in the roughcef is a jewel in the roughcef is a jewel in the rough
 


Animal Rescue
Ah yeah. I commented that out in the test code as well and forgot to mention it.
cef is offline  
Closed Thread


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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 04:34 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger