Posts: 2,536
Location: Western Maryland
|
milomedia,
Are you indicating that you don't mind if the screen refreshes after hitting 'Next?' If that's the case, then you can do the initial pull to identify which primary keys are the photos you wish to display. You could either store that in the session or you could POST it from screen to screen using an <input type="hidden"> field. Then use your 'Next' and 'Previous' buttons to keep track which of those images you are currently displaying. So let's say your list of images to display for the bedroom are 455,456,461,467,475 (primary keys out of your image table).
Then your URL could look something like this:
displayPicture?list=455,456,461,467,475&displaying =456
Here, your logic would pick apart the list and see that you have 5 images to display and that you are currently displaying the 2nd in a series of 5. From that, you could derive the logic to display or not to display the next/previous buttons (e.g., if you were displaying 455, then no previous button).
Is this close to what you are asking for?
Sorry, I'm not in a place where I can write and test code right now, but let me know how this satisfies your problem.
__________________
—Kyrnt
|