Interference from CSS hacks - Headers already sent
Posted: Tue Apr 14, 2009 1:10 am
I keep getting the 'headers already sent' error, and apparently this line is the culprit:
<!--[if !IE]>--> <link href="2_layout16.css" rel="stylesheet" type="text/css"> <!--<![endif]-->
I need that line there so that my site will display properly in different browsers; got the code off http://www.webdevout.net/css-hacks.
The relevant part of the code (line 5):
where scheck.php =
How do I fix this?
Thanks!
<!--[if !IE]>--> <link href="2_layout16.css" rel="stylesheet" type="text/css"> <!--<![endif]-->
I need that line there so that my site will display properly in different browsers; got the code off http://www.webdevout.net/css-hacks.
The relevant part of the code (line 5):
Code: Select all
<html>
<head>
<title>TEST PAGE</title>
<link rel=stylesheet href="layout17.css" type="text/css">
<!--[if !IE]>--> <link href="2_layout16.css" rel="stylesheet" type="text/css"> <!--<![endif]-->
</head>
<body bgcolor="black">
<div id="login">
<p>
<? include 'scheck.php' ?>
</p>
</div>
Code: Select all
<?PHP
session_start();
$scheck = (!(isset($_SESSION['login']) && $_SESSION['login'] != ''));
if ($scheck) {
print "<a href='loginpage.htm'>Login</a> | <a href='register.htm'>Register</a>";
}
else {
print "Logged in as user <b><a href='loginsuccess.htm'>" . $_SESSION['uname'] . "</a></b> | <a href='logout.php'>Logout</a>";
}
?>
Thanks!