i have all of a sudden started getting this error on my webpage and after hours of trying to figure this out i could use some help.
this is the error i am getting
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/lwherry/public_html/test/includes/functions.php:1) in /home/lwherry/public_html/test/includes/header.php on line 1
all my pages
this is the code i use for the beginning of all my webpages.
Code: Select all
<?PHP session_start();?>
<html>
<head>
<title>Supply City</title>
<link href="stylesheets/public.css" media="all" rel="stylesheet" type="text/css">
</head>
<body>
<div id="header">
<h1 align="center"><a href="index.php">Supply City</a></h1>
</div>
<div id="login">
<?php
if($_SESSION['SESS_FIRST_NAME']==''){
echo "<a href='login.php'>login</a>";
echo "     ";
echo "<a href='register.php'>register</a";
}else{echo "Welcome ".$_SESSION['SESS_FIRST_NAME']." ";
echo "<a href='account.php'>My Account</a> ";
echo "<a href='logout.php'>logout</a>";}
?>
</div>
<div id="main">Code: Select all
<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php include("includes/header.php"); ?>
<?php include("includes/cat.php")?>
<td id="page">
<h2>New Products</h2>
<table id="tblcenter">
<tr >
<th></th>
<th align="left">Product</th>
<th>Date Added</th>
<th>Price</th>
<th>Stock Remaining</th>
</tr>
<?php
$subject_set=getNewestProduct();
$num = mysql_numrows($subject_set);
$i=0;
while ($i<$num){
echo "<tr class=\"off\" onmouseover=\"this.className='on'\" onmouseout=\"this.className='off'\" id=\"tblrow\">";
$id=mysql_result($subject_set, $i,0);
$catid=mysql_result($subject_set, $i,1);
$name=mysql_result($subject_set, $i,2);
$desc=mysql_result($subject_set, $i,3);
$date=mysql_result($subject_set, $i,4);
$price=mysql_result($subject_set, $i,5);
$stock=mysql_result($subject_set, $i,6);
$image=mysql_result($subject_set, $i,7);
if (strlen($desc)>90){
$desc=substr($desc,0,90);
$desc=$desc."...";
}
echo "<td ><a href='product.php?product=$id' id='img'><img src='$image' width='100%' height='100%'></a></td>";
echo "<td > <b><a href='product.php?product=$id' id='prname'>$name</a></b><br><br>  $desc<br><br></td>";
echo "<td ><center>$date</center></td>";
echo "<td ><center>£$price</center></td>";
echo "<td ><center>$stock</center><br><br>";
//echo "<form method='post' action='basket.php'>";
//echo "<input type=hidden name='id' value='$id'>";
//echo "<input type=hidden name='action' value='add'>";
//echo "<input type='submit' name='submit' value='Add to cart' id='submit'/>";
//echo "</form></td>";
echo "</tr>";
$i++;
}
?>
</table>
</td>
</tr>
</table>
<?php include("includes/footer.php"); ?>gisler