Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

access to a global info from various files.


Recommended Posts


I wonder if someone can shed some light on why I am not able to access a global peice of info from various files.

(PS: I'm running locally on my machine with my Apache server, and the OSCommerce store is up and running).


in my top 'index.php' page, I set the name of a "school" to a variable that I wish to access from various objects. However, I can't see this variable from within other files. Specifically:


Here is what I did in 'index.php', before the 'html' tag, I set the variable:


$_SESSION['my_school_name'] = "SW_high";



Later on, in file 'categories.php' , I want to be able to access that variable:

define('TEXT_MAIN', "Welcome to Print Bright, Estores," . " this store name is " . $_SESSION['my_category'] );


similarly in file 'categories.php', I want another access:

$my_school = $_SESSION['my_school_name'] ;


both of the above accesses yields, NOT set. I'm obviously missing somehing fundamental...but I can't see it.

Any suggestions are appreciated... Thanks.

Link to comment
Share on other sites




Remember, What you think I ment may not be what I thought I ment when I said it.




Auto Backup your Database, Easy way


Multi Images with Fancy Pop-ups, Easy way


Products in columns with multi buy etc etc


Disable any Category or Product, Easy way


Secure & Improve your account pages et al.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...