Should look like this:
Anders Mellström wrote:
Hello. I can't get this code to work. The error message I get is that the header could be added, cause it has allready been sent. What shalll I do to get it to work?
//Anders
<?php
if ($i == 1)
{
Header("location:main.php");
exit;
}
else
{
//print("Byt webbläsare!"); -- displayed later
}
?><html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) > 5))
{
window.alert("Upgrade version of NS.");
}
else
{
document.write("<?php $i = 1 ?>");
}
</script>
<link rel='stylesheet' href='stil.css' type='text/css'>
</head>
<body>
<br>
Byt webbläsare!
</body>
</html>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php