Hi!

I searched the forum for this but coudn't find anything. I want to know why this code isn't working:

Code:
<?php
setcookie('log', ' ', time()-60);	
include("functions.php");
echo "Wait...";
redirect('login.php'); 
?>
That's the only thing in the file. That file is called 'logout.php' and from a javascript function I'm doing a:

Code:
window.location.replace('logout.php');
It is suppose to clear the cookie but I'm getting the following error:

Warning: Cannot modify header information - headers already sent by

Any ideas?