您好,我有一个登录系统,我在登录帐户时使用了会话。在
localhost 一切正常,但在 MY CPANEL 中显示以下内容
问题:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/scalepro/public_html/Admin Panel/Remote Employee/main.php:1) in /home/scalepro/public_html/Admin Panel/Remote Employee/main.php on line 3
Warning: Cannot modify header information - headers already sent by (output started at /home/scalepro/public_html/Admin Panel/Remote Employee/main.php:1) in /home/scalepro/public_html/Admin Panel/Remote Employee/main.php on line 20
<?php
session_start();
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;
header('Location:REPLists.php');
}
else
{
echo 'Email: <b>'.$email. '</b> or Password <b>'. $password.'</b> Is Not Typed Correctly Try Again Please!.';
header( "refresh:5;url=../../spd/myaccount.php" );
}
}
else
{
header( "refresh:1;url=../../spd/myaccount.php" );
}
?>