Hello all, I am getting the above error while I was trying to make a login system.
These are my codes.
Based on whether the person is logged in or not, the dropdown changes. Those codes are below.HTML Code:<!-- Website Navigation Bar placed here --> <div class="container"> <div class="navbar navbar-inverse"> <div class="navbar-inner"> <div class="container" style="width: auto"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <div class="nav-collapse collapse"> <ul class="nav"> <li><a href="http://ankursinha.net/tofsis/index.php"><strong>Home</strong></a></li> <li><a href="http://ankursinha.net/tofsis/index.php"><strong>Downloads</strong></a></li> </ul> <?php if(logged_in() === true) { include $_SERVER["DOCUMENT_ROOT"].'/tofsis/faculty_logged_in.php'; } else { include $_SERVER["DOCUMENT_ROOT"].'/tofsis/logged_out.php'; } ?>
If logged in:
If not logged in:HTML Code:<ul class="nav pull-right" role="navigation"> <li class="dropdown"> <a href="#" id="link1" role="button" class="dropdown-toggle" data-toggle="dropdown"> <strong>Hi, <?php echo $user_data['faculty_fname']; ?></strong> <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu"> <li><a href="changepass.php">Change Password</a></li> <li><a href="logout.php">Log Out</a></li> </ul> </li> </ul> </div> </div> </div> </div> </div>
And this is my logged in function:HTML Code:<ul class="nav pull-right" role="navigation"> <li class="dropdown"> <a href="#" id="link1" role="button" class="dropdown-toggle" data-toggle="dropdown"> <strong>Hi, <?php echo $user_data['faculty_fname']; ?></strong> <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu"> <li><a href="flogin.php">Faculty Login</a></li> <li><a href="slogin.php">Student Login</a></li> </ul> </li> </ul> </div> </div> </div> </div> </div>
Thing is no matter I am logged in or not, I still get the same error.HTML Code:function logged_in() { return (isset($_SESSION['faculty_id'])) ? true : false ; }
Here is the site link: http://ankursinha.net/tofsis/
Please help me solve this problem. The code ran perfectly on my localhost having PHP 5.3, but I am facing problem on the webserver having PHP 5.3 though I think the version is not the problem here.



Reply With Quote

Bookmarks