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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.