Hello everyone:
I'm a bit frustrated because I'm getting an error on one website but not on another one for the same web page. This tells me there's something different about the PHP settings that is different, but I'm not sure where to begin. This is the error I get:
Warning: Cannot modify header information - headers already sent by
Based on my reading online, it is supposedly common for this error to occur when there is extra white space showing up in the code. I'm not sure that this is my problem because, like I've already mentioned, on one site the code works and the other it doesn't. Here is the code being referenced in the error:
if(isset($_COOKIE[session_name()])) {
setcookie(session_name(), ' ', time()-42000, '/');
}
session_destroy();
redirect_to("index_bi.php?order=$name");
What I'm trying to do is after the order to borrow books has been placed and an email sent telling of the order, I want the session to be destroyed so that there is nothing left in the person's order list. Any ideas what's wrong? Thank you.