Jump to content

[SOLVED] Error i get on all pages, everything still works though.


loony383

Recommended Posts

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/airserve/public_html/airboard/header.php:2) in /home2/airserve/public_html/airboard/include/session.php on line 21

 

on my index page and i havent edited the sessions.php before i got the error, this is on my index page and this is my index.php code

 

<?php 
include "header.php";
include ("menu.php");
include "connect.php"; //mysql db connection here
include("include/session.php");
print "<link rel='stylesheet' href='style.css' type='text/css'>";

if($session->logged_in)
{
  echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"
  ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>]   "
  ."[<a href=\"useredit.php\">Edit Account</a>]   ";
  if($session->isAdmin())
  {
    echo "[<a href=\"admin/admin.php\">Admin Center</a>]   ";
  }
  echo "[<a href=\"process.php\">Logout</a>]";
}
else
{
   echo "Welcome <b>Guest</b>, you are not logged in. <a href='main.php'>Login</a><br><br>";
}

print "<A href='post.php'>New Topic</a><br>";

print "<table class='maintable'>";

print "<tr class='headline'><td width=50%>Topic</td><td width=20%>Topic Starter</td><td>Replies</td><td>Last replied time</td></tr>";

$getthreads="SELECT * from forumtutorial_posts where parentid='0' order by realtime DESC";

$getthreads2=mysql_query($getthreads) or die("Could not get threads");

while($getthreads3=mysql_fetch_array($getthreads2))
{
  $getthreads3[title]=strip_tags($getthreads3[title]);
  $getthreads3[author]=strip_tags($getthreads3[author]);
  print "<tr class='mainrow'><td><A href='message.php?id=$getthreads3[postid]'>$getthreads3[title]</a></td><td>$getthreads3[author]</td><td>$getthreads3[numreplies]</td><td>$getthreads3[showtime]<br>Last post by <b>$getthreads3[lastposter]</b></td></tr>";
}
print "</table>";
include("include/view_active.php");
include "footer.php";
?>

include session.php before header.php

include("include/session.php");
include "connect.php"; //mysql db connection here

include "header.php";
include ("menu.php");

 

Also please can you use code tags


when posting code with in posts. I have done it for you. But next time use code tags

 

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.