Session errors at top of page
Posted: Fri Sep 22, 2006 11:16 am
When i view my page:Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/razor/public_html/suf/index.php:5) in /home/razor/public_html/suf/include/session.php on line 46
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/razor/public_html/suf/index.php:5) in /home/razor/public_html/suf/include/session.php on line 46
Code: Select all
<?php
include('./Function/bb_code.php');
include('Header.php'); // Include Head file
?>
<table Align="Left" >
<tr ALIGN="center"><td>Navigation</td></tr>
<tr ALIGN="center"><td>[<a href="./index.php">Home</a>]</td></tr>
</table>
<Table align="center" >
<Tr>
<td>
<?
/*THE NEW AND IMPROVED VERSION:*/
/* Should still be connected
mysql_connect ('localhost', 'root', 'smart101') ;
mysql_select_db ('suf_site');
*/
if(isset($_GET['page']))
{
$page = $_GET['page'];
$sql = "SELECT * FROM site_stuff ORDER BY timestamp DESC LIMIT 5 ";
}
else
{
$sql = "SELECT * FROM site_stuff ORDER BY timestamp DESC LIMIT 5 ";
}
$result = mysql_query($sql) or print ("Can't select entries from table php_blog.<br />" . $sql . "<br />" . mysql_error());
while($row = mysql_fetch_array($result)) {
$date = date("l F d Y", $row['timestamp']);
$title = stripslashes($row['title']);
$icon = $row['icon'];
$entry = stripslashes($row['entry']);
$id = $row['id'];
$entryout = addbbcode($entry);
?>
<p><strong><img src="<? echo $icon ?>" onClick="alert('Yeah, im FAT get over it! Nvm ')"> <?php echo $title; ?></strong><br /><br />
<?php echo $entryout; ?><br /><br />
Posted on <?php echo $date; ?>
<? $result2 = mysql_query ("SELECT id FROM site_comments WHERE entry='$id'");
$num_rows = mysql_num_rows($result2); ?>
<?php echo "<a href=\"viewentry.php?id=" . $id . "\">" . $num_rows . " comments</a>"; ?>
<hr /></p>
<?