I am stumped by need for virtual contact me form with changing navigation links??

Discussion in 'HTML & Website Design' started by carlos123, Sep 17, 2009.

  1. #1
    Here is a problem that has me completely stumped up to now that I would greatly appreciate some input on...

    For purposes of illustration..let's say I have two directories with different navigation links that show up on the default page that is displayed when in the directory.

    Both directories are off my Apache document root which is /home/carlos/web/ on my computer (I am running virtual domains under localhost). The actual directory that corresponds to Directory 1 below is actually /home/carlos/web/my-domain.local/ but Apache considers that directory the document root for the domain, my-domain.local (the local version of the site my-domain.com that I have hosted on a web server).

    Directory 1 - /
    Contact Me
    Free Lessons

    Directory 2 - /lessons/
    Contact Me
    Lesson Intro
    Lesson 1

    When http://my-domain.local is entered in my browser, Page 1 shows up as the default page with the links indicated above for Directory 1.
    When http://my-domain.local/lessons/ is entered Page 2 shows up as the default page with the links indicated above for Directory 2.

    When I enter /lessons/ and am seeing Page 2 through my browser....if I click on the Contact Me link I want the contact form (which is physically located in Directory 1) to be displayed with the links that normally show up when inside the /lessons/ directory.

    In other words I want a virtual Contact Me form. Not one that is tied to Directory 1 such that where ever my Contact Me form shows up the links displayed in the left hand navigation area will correspond to the links that would normally show there for the given directory I am in.

    But how can I accomplish this? Have a virtual Contact Me form I mean?

    I have tried using PHP sessions to pass a variable set to the directory I am in to the main php program that generates web pages but it's still not working properly. I have also tried creating an Apache env variable to again contain a value corresponding to which directory the Contact Me form is being called from but I am still not there yet.

    Does anyone know of a simpler way to accomplish this?

    Any input would be greatly appreciated.

    Thanks.

    Carlos
     
    carlos123, Sep 17, 2009 IP