I have the code listing for a page 'general1.php'. This page has a few 'include' files.
The session is created in the previous page and hence is available in this page. The session variable '$SESSION['ROOT'] is available in ' include($SESSION['ROOT']."util/dbUtils.php") line.
The next line is include($_SESSION['ROOT']."menu/navigationlinks.php");
This navigationlinks.php has another include within it and is ccoded like this:
"include include ($_SESSION 'ROOT']."globals/global_def.php");
In this line, I get an error that '%_SESSION' is undefined. I checked and the session id was null within 'navigationlinks.php'
How to fix this error? Am I doing anything wrong here.
Please help.
---- Code Below ---
<? session_start();
// echo 'General One SessionID is ' . session_id();
?>
<html><link rel="stylesheet" href="<? echo $_SESSION['SITEROOT'].'Style/style.css';?>" type="text/css" />
<head>
<title>Title One</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body class="content">
<?
include($SESSION['ROOT']."util/dbUtils.php");
// echo 'General One SessionID is ' . session_id();
include($SESSION['ROOT']."menu/navigationlinks.php");
include ($_SESSION['ROOT']."menu/content_menu.php");
nav_menu('top');
<br>';
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="80%"> <!-- REAL CONTENT begins HERE -->
<?
$channel = $GET['id2'];
$label = $GET['id1'];
// echo $channel.' '.$label;
format_page2 ($channel, $label);
?>
<!-- REAL CONTENT ends HERE -->
<? include ($_SESSION['SITEROOT']."footer.php")?>
</td>
</tr>
</table>
</body>
</html>