I have done a page that can only be accessed after a login. Now I have done a logout button, which works, but I get after logging out an error message. The redirection works after two seconds, the session ends, but I still get the following error:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/u200098000/public_html/logout.php:2) in /home/u200098000/public_html/logout.php on line 3
This is my code:
<?php
session_start();
session_destroy();
echo "<h1>You succesfully logged out</h1>";
echo '<p> If you are not redirected automatically please click <a href="index.html">here</p>';
echo '<script>';
echo 'redirectTime = "2000";';
echo 'redirectURL = "/index.html";';
echo 'setTimeout("window.location = redirectURL",redirectTime);';
echo '</script>';
?>
Thanks a lot for any help.