Good Hello,
I have created a simple tree structure.
This is the table structure
ID is_parent_id
category_name
if is_parent_id=0 , then those are the top level parents .
to get sub-categories (children) of any category (ie: ID=5) you just : SELECT * FROM categories WHERE is_parent_id=5
simply enough right?
now the problem I have is that if I want to go BACK . and get the last viewed list.
remember that the tree is generated dynamically, and the user can theoretically be Hundred levels down.
is there any way I can have a dynamic "back" button that allows the user to back as far as he wants?
I'm trying to maybe pass the current clicked paren_ID into a tag clicked_id_1="X".., So I can use down the next level if the user clicks the back button, but I can't keep storing ALL THE CLICKED_IDS in all the levels, can I?
I'm really stuck and need someone that will look at this matter from outside the box.
I need the "back" button to work dynamically and practically. without the "number of levels," the user has gone through be a factor to its efficiency
Thank you