cmr Posted October 29, 2007 Share Posted October 29, 2007 Have no problem with this on any of my other pages, have checked for white space and even unformatted it to check and put it into Notepad instead of TextPad but no joy there. Dont know if its anything to do with cookies, any help much apreciated. Errors: Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\include\header.php:7) in C:\wamp\www\log_out.php on line 9 Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\include\header.php:7) in C:\wamp\www\log_out.php on line 10 Header.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link type="text/css" href="style.css" rel="stylesheet" media="screen" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="resource-type" content="document" /> </head> <body> <div id="container"> <div id="header"> <div class="header01"></div> <div class="header02"> <div id="header_text"> <?php if (!isset($_COOKIE['cookie_user']) && !isset($_COOKIE['cookie_pass'])) { ?> Login <form method="POST" action="log_in.php"> Username <input type="text" name="frm_user" id="frm_user" size="20" /><br /> Password <input type="password" name="frm_pass" size="20" /><br /> <input type="submit" value="Submit" name="sub" /> <input type="reset" value="Reset" name="res" /> </form> <a href='register.php'>Register</a> <a href='password.php'>Lost Password?</a><br /> <?php } else { $user = $_COOKIE['cookie_user']; echo "<h3>Welcome Back</h3>"; echo "<h4>$user</h4>"; echo "<h4><a href='log_out.php'>Log Out</a></h4>"; } ?> </div> </div> <div class="header03"></div> </div> log_out.php <?php include('include/header.php'); include('include/menu.php'); $time = time(); if (isset($_COOKIE['cookie_user']) && isset($_COOKIE['cookie_pass'])) { setcookie ("cookie_user", "", $time - 300000); setcookie ("cookie_pass", "", $time - 300000); echo "<h1>Log Out</h1>"; echo "<p>All Cookies Cleared</p>"; echo "<p><a href='index.php'>Back to Home</a></p>"; } include('include/side.php'); include('include/footer.php'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/75201-solved-cannot-modify-header-information-headers-already-sent/ Share on other sites More sharing options...
cmr Posted October 29, 2007 Author Share Posted October 29, 2007 Sorry to waste your time i read the top at the top now, seems i just suck at coding etc thanks anyway. Quote Link to comment https://forums.phpfreaks.com/topic/75201-solved-cannot-modify-header-information-headers-already-sent/#findComment-380335 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.