Session_Start issue
Posted: Wed May 19, 2010 7:59 am
I have three pages:
index.php is obviously my primary page, which uses an INCLUDE to call the next page.
login.php is called via an INCLUDE from index.php and it's function is to display the login boxes for the users and check the vaildity of the login against the database of users.
Sentry.php does the actual data checking and validation and is called within login.php using a REQUIRED_ONCE command.
If I run login.php everything is fine.
If I run index.php I get the following:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\xampp\htdocs\site1\index.php:11) in C:\Program Files\xampp\htdocs\site1\includes\Sentry.php on line 14
The index.php file reads:
If I move the INCLUDE to the very top of the index.php then the login works but I now get the login box outside of my index container div. How can I use the login box where I want to and yet still maintain the functionality of the login system?
index.php is obviously my primary page, which uses an INCLUDE to call the next page.
login.php is called via an INCLUDE from index.php and it's function is to display the login boxes for the users and check the vaildity of the login against the database of users.
Sentry.php does the actual data checking and validation and is called within login.php using a REQUIRED_ONCE command.
If I run login.php everything is fine.
If I run index.php I get the following:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\xampp\htdocs\site1\index.php:11) in C:\Program Files\xampp\htdocs\site1\includes\Sentry.php on line 14
The index.php file reads:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Revision Rocks Online</title>
<link href="rro.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="content_top"></div>
<div id="content_main">
<?php include("controls/login.php") ?>;
<a href="page2.php" target="_blank">
<div id="anchor1"></div>
</a>
</div>
<div id="content_bottom"></div>
</div>
</body>
</html>