Re: Next and Previous
| From: | Miguel Br�s | Date: | Wed, 15 Jan 2003 01:21:58 +0000 |
| Subject: | Re: Next and Previous | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131640@lists.php.net to get a copy of this message | ||
That's not the case, I tested it on ID549 and the previous one should be 548
and he still assume -1
Miguel
"Timothy Hitchens )" <hitcho@php.net> escreveu na mensagem
news:000101c2bc33$7e887020$0500a8c0@bambino...
This is because you are at the beginning and you need to have some logic
to not display the previous if at beginning.
Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: tim@hitcho.com.au
> -----Original Message-----
> From: Miguel Brás [mailto:molino26@netcabo.pt]
> Sent: Wednesday, 15 January 2003 11:06 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Next and Previous
>
>
> Hi,
>
> it's giving me an error. it assumes the next page as
> news.php?ID=1 and the previous as news.php?ID=-1 Any hint for that?
>
> Miguel
>
> "Chris Shiflett" <shiflett@php.net> escreveu na mensagem
> news:20030115003630.76514.qmail@web14303.mail.> yahoo.com...
> >
> --- Miguel Brás <molino26@netcabo.pt> wrote:
>
> > > suppose, the page you're seeing is
> > > http://www.xxxxx.com/news.php?ID=501 how to add a
> > > link
> for the page
> > > to show the ID=502 and the ID=500
> >
> > <a href="news.php?ID=<? echo $_GET['ID']+1;
> > ?>">Next</a>
> >
> > <a href="news.php?ID=<? echo $_GET['ID']-1;
> > ?>">Previous</a>
> >
> > Chris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>