Re: Last one for today! Pager problem

From: Date: Tue, 18 Apr 2006 21:28:17 +0000
Subject: Re: Last one for today! Pager problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-234220@lists.php.net to get a copy of this message
On Tue, April 18, 2006 9:46 am, Ross wrote: > > http://scottishsocialnetworks.org/editor.phps > > > My pager does everything but when I hit any of the links for the pages > it > doesn't show any results. > > > It can be seen here (alothough the page doesn't seen to submit on the > remote > host. Any ideas why?? This is bad: if(!isset($_GET['page'])){ $_GET['page']=1; $page = $_GET['page'];} //$page = $_GET['page']; You need something like this: if (!isset($_GET['page'])) $page = 1; else $page = $_GET['page']; As it stands now, you only set $page if $_GET['page'] is not set. So you either have: No $_GET['page'] => $page = 1 $_GET['page'] = ANYTHING => $page is not set, so it's just 0. You do that same mistake at the top with all the $_POST stuff. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#234220) next »