Monday, March 16, 2009

PHP - CONDITIONAL INCLUDES

This is for an include being pulled into a page that goes across several pages. The situation that I used it in was in the partner portal that had several tiers of membership. So rather than create four different includes. I just set it up so that based on a parameter I passed from the page, the include displays whichever piece of content that was appropiate.

On Page --------------------------------



The Include --------------------------------

style="display:block;" style="display:none;" >
SETUP 1 CONTENT GOES HERE


style="display:block;" style="display:none;" >
SETUP 2 CONTENT GOES HERE


style="display:block;" style="display:none;" >
SETUP 3 CONTENT GOES HERE


style="display:block;" style="display:none;" >
SETUP 4 CONTENT GOES HERE