Jump to content

Please help me out here...


louis_coetzee

Recommended Posts

Okay, what i have got is a index.php with a banner and a menu...inside this index i do my content switching, requiring different pages according to the get variable.

 

menu.html contains the code for a menu I generated with a program I downloaded from the internet.

 

In my login page where once the person has entered the correct username and password I am trying to redirect him to index.php?id=home

 

I get the following error:  Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\website\menu.html:1)in C:\wamp\www\website\login.php on line 50

 

What can I do to fix this. Please any help would be appreciated. I know there are posts about these header errors, but I cant seem to solve the problem, because once I remove the menu, which is pure css and javascript without the normal body and html tags, it does'nt give me the error aymore.

<?php
session_start();
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mywebsite</title>
<link href="style1.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="JavaScript1.2" src="menu/menu.js"></script>

</head>

<body>
<noscript>
<meta http-equiv="refresh" content="1; URL=jserror.php">
</noscript>
<div id="body_container">
<table width="650" align="center">
  <tr>
    <td height="58"><div id="c4a_logo"></div><div id="cs_header"></div><div id="recruiter_cs_link"><a href="#">Recruiters click here</a></div></td>
  </tr>
</table>
<!-- menu goes here -->
<div id="menu_container">
<?php require_once("menu.html") ?>
</div>

Link to comment
https://forums.phpfreaks.com/topic/140962-please-help-me-out-here/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.