-1

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers

already sent (output started at /home/scalepro/public_html/Admin ............................. Actually there is no space and output but still showing the above error message.

Here is the code:

<?php 
ob_start();session_start();
?>
<html>
<head>
</head>
<body>
<?php
require_once('../../Admin Panel/db.php');
if(isset($_POST['email']) && !empty($_POST['email']) && isset($_POST['password']) && !empty($_POST['password']))
{
 $email = $_POST['email'];
 $password = $_POST['password'];
 $query="SELECT RemoteEmployeeFullName, RemoteEmployeeEmail, RemoteEmployeePassword FROM remoteemployees WHERE RemoteEmployeeEmail='".$email."' AND RemoteEmployeePassword='".$password."'";
 $queryrun=$connection->query($query);
       if($queryrun->num_rows > 0)
       {
           $_SESSION['email']=$RemoteEmployeeFullName;
           echo '<META HTTP-EQUIV="Refresh" Content="0; URL=REPLists.php">';    
           exit();
       }
       else
       {
           echo 'Email: <b>'.$email. '</b> or Password <b>'. $password.'</b> Is Not Typed Correctly Try Again Please!.';
           echo '<META HTTP-EQUIV="Refresh" Content="5; URL= ../../spd/myaccount.php">';
           exit();
       }

}
else
{
    echo '<META HTTP-EQUIV="Refresh" Content="5; URL= home/scalepro/public_html/spd/myaccount.php">';
    exit();
}?>
</body>
</html>
Falko
  • 17,076
  • 13
  • 60
  • 105
nando pandi
  • 63
  • 2
  • 7

2 Answers2

1

Make sure you have nothing that outputs to the browser before those lines and delete any unessasary whitespace from that code up.

Nisarg
  • 3,024
  • 5
  • 32
  • 54
  • Patel sahab i have opend the pages via notepad there is no while space and breakline. – nando pandi Jun 27 '13 at 05:31
  • check this - http://stackoverflow.com/questions/7373853/warning-session-start-function-session-start-cannot-send-session-cache-lim – Nisarg Jun 27 '13 at 05:34
0

Check your require_once('../../Admin Panel/db.php'); file. if session is start in this file then you need to include it above the HTML tags.

skparwal
  • 1,086
  • 6
  • 15