Jump to content

session problem


ohdang888

Recommended Posts

one question....

 

i have

<?php session_start(); ?> on the "topmenu.php" which is included on every single page.

 

but on the first page i am going to (the homepage) i am getting this error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\index.php:2) in C:\xampp\htdocs\include\topmenu.php on line 1

I'm logged out, and cleared all cookies and data in my IE, but its still doing that error

 

whats wrong?

 

P.S.- thanks for helping me!

Link to comment
https://forums.phpfreaks.com/topic/94081-session-problem/
Share on other sites

<?php session_start(); ?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<BODY bgcolor="#666666"> 
<body leftmargin="0">
<body topmargin="0">
<font size=1>
<Br> 
<Br> 
<center>

<font size=3>
<div style="background-color:#C0C0C0;overflow: hidden; width:920px;height:100%">
<Center>
<table>
<tr><td>

<div style="width:908px"> 
<div id="leftColumn" style="float:left; width:173px;">  
<Br> 
        <IMG SRC="../thegameking.jpg" WIDTH="173" HEIGHT="49" BORDER="0" ALT="TheGameKing.Net - Free Online Gaming, Games">
<font size=2><center>

<?php 
if(strlen($_SESSION['id']) == 0){
echo '<A HREF="login.php" style="color:black">Login</a> | <A HREF="register.php" style="color:black">Register</A>';
} else {
echo '<A HREF="member_home.php" style="color:black">MyHome</A> | <A HREF="logout.php" style="color:black">LogOut</A> ';
}?>


</div> 

 

thanks for helping!

Link to comment
https://forums.phpfreaks.com/topic/94081-session-problem/#findComment-481954
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.