so you need to know the current record, and he order/criteria you got to that record, for that it should be possible to get the next or previous record.
depeding on how you retrieve the data it should be fairly trivial.
assumign you are using PHP in a web (internet or intranet) environment the next / previous buttons should call the same page with the relevant primary key.
a quick and dirty way of doing this would be to issue two queries which retrieve the next row (use the LIMIT 1 clause. one query should request ASCending sort order for the next, the other should specify the DESC. the problem is going to e making sure you are using the same criteria (and therefore the same sort orders)
so in this case youd need something like
//to find next record
select id,title,stuff from mytable where ID>=blah order by ID ASClimit 2 //retrieves the current speciified ID and the next row
//to find previous record
select id,title,stuff from mytable by ID where ID<blah order by ID DESC limit 1 //retrieves the previous row
you will need to check if each query returned valid data... ie you may be at the beginning or end of the dataset and therefore not have a previous and or next record.
having retrieved the id of those rows you then call the same form with the desired id.
you could expand the same methodology to say go back/forward 10 rows.
the first or last record can be found using something such as
select Min(id) as MinID,title,stuff from mytable
select Max(id) as MaxID,title,stuff from mytable