Can this be done?

Soldato
Joined
26 Nov 2005
Posts
3,839
Location
Doon the Bay (Newcastle)
I want a selected option (data called from DB1) on page1 to carry across (using sessions?) to page 2 that will effect what data is displayed on page 2 from the same DB1.

This to be repeated till and end result of several selected options from the DB1.

Real world is that its a component selector, components are pulled from a DB and put up on screen, then your selection directly effects the next page...e.g...selected a Intel 775 CPU next page show only 775 Motherboards.

I'm trying to work out how to do this in my head. Thinking sessions to carry the values across, and it carry the posted session results through the several pages until it can be displayed but then some sort of SQL on each page which limits what data is displayed (options)

Really sorry if that sounded like total jibberish, thanks if you can understand and confirm this can be done.
 
It can be done, but the best way to do it is what I'm trying to think of.

If your project is a one off then it doesnt really matter.. but say in the future a new socket came out, if you were checking for a specific socket via the php you would have to code another section to pick up the new socket.. not great design.

You could design it so that the session variable for the socket can be used in the DB query to extract the related results. So if you were to add a new socket, it wouldn't change the php, the session var would contain the new socket already.

Put simply:
Page 1 - choose CPU - DB query to grab data - session vars store selection
Page 2 - session vars used to pull out associated Mobos only
 
Back
Top Bottom