Previous & Next bottom not work

Second Question mean,
When put the button in site, I can connect a database like this image.

But you said If I want to use button I have to write a code.

Then the ‘previous’ and ‘next’ connect, when I use it?