SESSION PROGRAM IN PHP


#1

[b]WHEN I EXECUTED FOLLOWING PROGRAM THEN THIS ERROR SHOWS;
SO PLEASE PROVIDE ME SOLUTION
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\wamp\www\bus_book\seat_book.php:3) in C:\wamp\www\bus_book\seat_book.php on line 689

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\bus_book\seat_book.php:3) in C:\wamp\www\bus_book\seat_book.php on line 689[/b]

<?php session_start(); $inactive = 10; // Set timeout period in seconds if (isset($_SESSION['timeout'])) { $session_life = time() - $_SESSION['timeout']; if ($session_life > $inactive) { session_destroy(); echo "session closed"; } } $_SESSION['timeout'] = time(); ?>

#2

As the error says you have some output before this file is executed.