Duelling home pages

Posted on 2005-05-09
Last Modified: 2006-11-18
I need to have 2 home pages, one for local and one for national. Visitors can start on either page. All other pages are shared. But when a visitor goes from any non-home page back to home, he must return to the same page he entered on.

I looked at $_SESSION array but it seems messy - cookies on/off, every page has to have a session_start(), etc. It also looks like all my files will change from htm to php.
I was hoping for an easier way, or maybe I'm over-complicating $_SESSION.

Any ideas would be appreciated.
Question by:dennis_n
    LVL 7

    Accepted Solution

    Let's start by cleaning it up. Convert all pages which would need the session to PHP. It was my understanding session_start is implicit.

    I would put print_r($_SESSION) at the top of each page and see what values are on each page. Then troubleshoot each page that fails the test.
    LVL 14

    Expert Comment

    No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
    I will leave the following recommendation for this question in the Cleanup topic area:
    Accept: Promethyl

    Any objections should be posted here in the next 4 days. After that time, the question will be closed.

    EE Cleanup Volunteer

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    This is a general how to create your own custom plugin system for your PHP application that you designed (or wish to extend a third party program to have plugin functionality that doesn't have it yet).  This is not how to make plugins for existing s…
    A colleague recently asked me about how to give his client a small part of the web site that could be completely under the client's control.  Since I have done this sort of thing before to add emergency banners to a web site, I decided I would creat…
    The viewer will learn how to count occurrences of each item in an array.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now