Ok,
I am having a problem with a project I am working on.
I have one file that registers my session variables called index.php. Users log in through the index.php page, I pull some data out of a database, like a pathname to a specific directory (different for each user). I then once the user logs in I send them to my admin.php file.
Now here is where the problem is. I also have a button_include.php file that is basically a top bar menu with all the buttons for the site. Now, for the URL of the buttons I uses <a href = $session_path/thisbutton.php>, which is one of my session variables. However, the $ses_path variable keeps being blank here.
It appears that if I include a file, that file does not have access to the session variables? Is that the case, or am I doing something wrong. I can access the variable fine through the admin.php file, just not through the button_include.php file.
Here is some code snipets from the 3 files:
index.php:
<?php
session_start();
session_register('ses_path');
$ses_path = "http://www.whateverstuff.com"
Admin.php
<?php
session_start();
include 'http://mydomain.com/admin/button_include.php';
button_include.php
<?php
session_start();
echo ("<a href='$ses_path/admin/layout.php' class='headerNavigation'>Site Layout </a>");
?>