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 )" <[EMAIL PROTECTED]> escreveu na mensagem
000101c2bc33$7e887020$0500a8c0@bambino">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: [EMAIL PROTECTED]

> -----Original Message-----
> From: Miguel Brás [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 15 January 2003 11:06 AM
> To: [EMAIL PROTECTED]
> 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" <[EMAIL PROTECTED]> escreveu na mensagem
> news:[EMAIL PROTECTED].> yahoo.com...
> >
> --- Miguel Brás <[EMAIL PROTECTED]> 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
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to