First Read My Sig it says search
click on it. There are been that many discussions about Next/Prev scripts and pagination that i think you should find many examples.
But the basics behind these scripts are
First
Create a query with the limit
Create a second query exactly the same minus the limit statement.
Count the totalrows
Check if the start or page not 0 and show Prev Link
If Total rows greater than start show Next
Than basically have a high and low statement to create the 1 2 3 4 link bit.
I have got one, but its not fully tested to be shown as a good example.