Thanks for advise, Thrope.
But still I would like to know what is problem with my coding.
Secondly, I thought that session is suitable for storing only small data.
OK, let me explain the use of this site.
The first page reads the 'Stock List' from file & displays the list. But visitors can set some criteria/conditions, so only filtered data is displayed there. It is about 40 to 50 records. SOme details is displayed on this list.
When visitor clicks the stock number of any single item, full details are shown on next page, with photos of that item. For that purpose, I am using stock number to be included in query string, & details page again read that record from stock list.
This part is working fine. But user has to go back to original list, to see the details of different item. I need "Next" & "Previous" buttons on that details page, so that user can just see the next item of his filtered list, without going back.
For that, I need to transfer the filtered stock list to "details.php" page. Pls guide me if there is any better way.