troubleshooting Question

Warning: Cannot modify header information - headers already sent by (output started at /home/runningp/public_html/members/index.php:6) in /home/runningp/public_html/functions.php on line 121

Avatar of Member_2_5230414
Member_2_5230414 asked on
PHP
44 Comments1 Solution5913 ViewsLast Modified:
How can i solve this error :S

below is my index.php

and the line of the function 121 is-

if ($access == false)
                        {
                                                header('Location: http://www.runningprofiles.com/error.php');
                                                exit();

                        }
<!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" xml:lang="en" lang="en">
  <head>
    <link rel="stylesheet" type="text/css" href="http://www.runningprofiles.com/css/login.css" />
  <link rel="stylesheet" type="text/css" href="http://www.runningprofiles.com/members/include/style.css" />
    <link rel="shortcut icon" href="rp.ico">
<link rel="icon" type="image/ico" href="rp.ico">

<style type="text/css">
<!--
body {
    margin-left: 1px;
    margin-top: 1px;
    margin-right: 1px;
    margin-bottom: 1px;
}
-->
</style> 
   <SCRIPT LANGUAGE="JavaScript" SRC="swapimage.js">
</SCRIPT>

  </head>

<body>
    

<?php  
ob_start();
//session_start(); 
	require_once '../settings.php';
	checkLogin ('1 2');
    
	       
require_once '../settings.php';
$id = $_SESSION['user_id']; 
include ("../header.php");  
?>
<body onLoad="MM_preloadImages('http://www.runningprofiles.com/images/editprofile2.jpg','http://www.runningprofiles.com/images/home2.jpg')">
<table width="100%" height="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="10%" align="left" valign="top"><table  class="menus" width="100%">
      <tr>
        <td align="center" valign="top" bgcolor="#CAD9D9" ><p>Menu</p>
          <p><a href="http://www.runningprofiles.com/members" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','http://www.runningprofiles.com/images/home.jpg',1)"><img src="http://www.runningprofiles.com/images/home2.jpg" alt="Home" name="home" width="93" height="82" border="0"></a></p>
          <p><a href="index.php?page=update" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('editprofile','','http://www.runningprofiles.com/images/editprofile2.jpg',1)"><img src="http://www.runningprofiles.com/images/editprofile.jpg" alt="edit profile" name="editprofile" border="0" id="editprofile" /></a></p>
          <p><a href="http://www.runningprofiles.com/logout.php">Logout</a></p>
          <p><?php if($id == 1){ echo '<a href="http://www.runningprofiles.com/members/index.php?page=admin">Admin</a>'; } ?></p>
          <p><a href="index.php?page=mainforums">Forum</a> </p>
          <p><a href="index.php?page=inbox">
<?php
$user= get_username($_SESSION['user_id']);$query = "SELECT * FROM messages WHERE reciever = '$user' AND recieved = '0';";
$result = mysql_query($query);
$no_of_msgs = mysql_num_rows($result);
if ($no_of_msgs != 0){
  $data = mysql_fetch_assoc($result);
  echo "Inbox($no_of_msgs)";
}
else{
   print "Inbox";
}?></a> </p>        
</td>
      </tr>
      
      
    </table></td>
    <td width="74%" align="center" valign="top"><? $page = $_GET['page'];
                    if (ereg('[A-Za-z0-9]',$page) ) {
                        if (file_exists('include/'.$page.'.php')) {
                            include('include/'.$page.'.php');
                        } else {
                            include('include/main.php');
                        }
                   } else {
                            include('include/main.php');
                    }?></td>
    <td width="10%" align="right" valign="top" bgcolor="99b3b4"><table class="menus" width="100%">
      <tr>
        <td align="center" valign="top" bgcolor="#CAD9D9">
        Menu<br>
        <?php include('include/newposts.php');?>
<br>
<?php include('shout/shoutbox.inc.php');?></td>
      </tr>
    </table></td>
  </tr>
  
</table>
</body>
</html>
ASKER CERTIFIED SOLUTION
john-formby
IT Project Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 44 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 44 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros