I asked the question "php warning - headers already sent after server move" yesterday and I have made changes since to try and fix the problem but im still not getting it!
I am working on code that has been made by another company! Im not moving the site off their server and putting it on ours but the my problem is that sessions are not working across the pages on the new server!
I am getting the warning: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/com10002/public_html/bank/index.php:28) in /home/com10002/public_html/bank/includes/quickform.php on line 3
In my index.php
include('includes/functions.php');
$activeTab = "navhome";
$sent = false;
$title = (isset($_GET['title']))? mysql_real_escape_string($_GET['title']) : 'Home';
$title = str_replace('-',' ', $title);
if($title != '') {
$sql = "SELECT *
FROM contents
WHERE name LIKE '%$title%'
LIMIT 1";
$result = @mysql_query($sql);
$row = mysql_fetch_assoc($result);
}
//Set page title
$pagetitle = (isset($row['name']) && $title != 'Home')? ucwords($row['name']) : "Bank Charges";
HTML..HEAD..META DATA AND TITLE TAGS..ECT
include('includes/header.php');
<div class="textarea">
<?php include('includes/rightcol.php'); ?>
<div id="contentvideo" style="display:none;"></div>
<h1><?=$row['h1'];?></h1>
<h2><?=$row['h2'];?></h2>
<?=$row['intro'];?>
<?php include('includes/quickform.php');?>
<?=$row['page_content'];?>
</div>
<?php include('includes/subnav.php'); ?>
and in quickform.php
if($_POST) {
session_start();
$error = false;
$captcha = false;
$sent = false;
etc.......
This is their code and currently works fine on the their server!
1) I have tried moving the session_start() to the top of index.php 2) Putting a session on both pages. 3) Removing white space before the session when it was in the index.php
My new version is the site is at www.compensation-claims.org/bank
Because this is not my code im not sure as to why they put the session in the quickform.php