deshi2003
03-14-2009, 05:42 PM
i am facing the following problem but i am not understanding how can i solve this problem.
i have a page named writeblog.php where without login access is denied.the code is as follows
3.session_start();
4.if (!isset($_SESSION['username']))
{
header('Location:index.php?redirection=' . urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']) );
exit;
}
when i go this page the following warning is occured
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\wamp\www\blog\Readblog.php:2) in D:\wamp\www\blog\Readblog.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\wamp\www\blog\Readblog.php:2) in D:\wamp\www\blog\Readblog.php on line 4
please help me out
include('prac.php');
?>
i have a page named writeblog.php where without login access is denied.the code is as follows
3.session_start();
4.if (!isset($_SESSION['username']))
{
header('Location:index.php?redirection=' . urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']) );
exit;
}
when i go this page the following warning is occured
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\wamp\www\blog\Readblog.php:2) in D:\wamp\www\blog\Readblog.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\wamp\www\blog\Readblog.php:2) in D:\wamp\www\blog\Readblog.php on line 4
please help me out
include('prac.php');
?>