I searched for a whole day but couldn't find solution to this. I'd like to build very simple 'prev' 'next' pagination, for that I'd like to keep value in a $counter variable so that after clicking a link 'next', system would via GET load next 10 rows from MySQL database and variable would be incremented, something like
$counter += 10;
I first needed to declare $counter variable and set it to 0, but after I click 'next' link, page refreshes and counter variable is reset back to 0, actually not moving with database listing. But I cannot go on without assigning initial value to this variable. It looks like a catch 22 to me.
I tried to solve this with SESSION but had same problem. I have spent 12 hrs trying to decypher this, analysed many pagination samples on net so pls help me if you can. Thanks. If that is silly q, sorry.