Hi,
I keep getting these errors and dont have a clue why.
I am very new to php so it could well be something small:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\members.php:2) in C:\Program Files\Apache Group\Apache2\htdocs\session.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\members.php:2) in C:\Program Files\Apache Group\Apache2\htdocs\session.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\members.php:2) in C:\Program Files\Apache Group\Apache2\htdocs\session.php on line 4
Here is the php from member.php :
<html>
<style type="text/css">
<!--
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #3366CC;
}
</style>
</html>
<?php
include ('common.php');
// Check if we have established an authenticated session
if (isset($_SESSION['login']))
{
echo '<p align="center" class="style6 style13"><font color="#000000">ERROR</p><br>'.
'<p align="center" class="style6 style13"><font color="#000000">YOU ARE ALREADY LOGGED IN</p>';
}
else
{
// No session established, no POST variables
//Display the login page
?>
and here is the script from session:
<?php
session_start();
session_name('session');
function login_check(){
if($_SESSION['login'] != TRUE){
include 'userlogin.htm';
exit();
}
}
?>
Can anyone help?
Please?