I have setup my site so that a user can go to a friendly folder name like this...
http://www.mydomain.com/cars
instead of
http://www.mydomain.com/page.php?location=cars
In the page where this is handled (we'll call this master.php) I do an include like this....
Code: Select all
include ("http://www.mydomain.com/page.php?location=cars");There are two ways I have tried to handle this:
1) Use the variable from the master.php in page.php. However, for some strange and frustrating reason I just cannot figure out, I can not get page.php to recognize variables set in master.php.
I've tried setting global all over the place that still nothing.
I thought it was perhaps because of the full URL in the include so I tried variations on...
Code: Select all
include ("page.php?location=cars");
and
include ("../page.php?location=cars");
etc.2) So I thought fine, I'll get my variables in page.php from the database again. They all work well except for one thing;
my session cookie that indicates if my users are logged in does not seem to work. On page.php (when included via master.php), my users always appear to be logged out. This is a mystery to me too. If I go straight to page.php my session cookie works fine.
Well, any insight would be appreciated.
Thanks!