I want to show the records from postgres database using php one by one by clicking the "NEXT" button on html form. How I can do that. I can fetch All the recods at a time or one record at a time but there seems no way to show the records sequetially through PHP on the click of next button. Thanks, dinesh mishra
You can use the LIMIT -clause of the SELECT-Query f.e. stepsize 20 Put a Parameter $offset in your Next-Link
SELECT ... FROM yourtable ... LIMIT $offset,20
Compute $offset += 20 in the next created link
If you just want one result, you would use Ingo's suggestion with one change:
SELECT ... FROM yourtable ... LIMIT $offset,1
Best of luck.