Copy link to clipboard
Copied
Her is my problem.
I have a database with approximately 4000 items in several categories with several sub-categories. In these categories I have many pictures’ also have these pictures connected with a previous and next hyperlink. As the customer proceeds thru the pictures, he/she may want to return to the products page for the category they are currently in if they are on the first picture in that category or subcategory I have no problem returning to the original page of that subcategory. However, if they are further into the current subcategory I cannot get back to the original page without backtracking thru all the pictures or items they have viewed. Can someone give me a code that would return me to the products page of the current sub-category. I have tried several ways but either I have a fatal error or receive a syntax error. I am currently using Dreamweaver 2021 in a php format with a MySQL database.
Copy link to clipboard
Copied
Moving thread to the Dreamweaver forum from Using the Community
Copy link to clipboard
Copied
I would use session storage to return to pages:
https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
Copy link to clipboard
Copied
I think you are going to have to provide another link below the next/previous links you currently have for your image gallery to get back to the original sub-category page and query the database again based on the sub-category you pass in that url link. Somewhat a duplicate workflow of how you got to the sub-categories page in the first instance - you direct the user back to the existing page which lists the sub-categories from the database query, when they click the link 'Back to Sub-Categories' ,
It stands to reason that the next/previous links will only ever advance one page/image or go back one page/image, they wont jump back several pages or go forward several pages.