# Header problem

**URL:** <https://forum.kirupa.com/t/header-problem/245184>\
**Category:** programming\
**Created:** [November 27, 2007, 7:56am UTC](https://forum.kirupa.com/t/header-problem/245184 "2007-11-27T07:56:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![function4](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@function4](https://forum.kirupa.com/u/function4)\
**Post date:** [November 27, 2007, 7:56am UTC](https://forum.kirupa.com/t/header-problem/245184/1 "2007-11-27T07:56:19Z")

</div>

I’ve tried reading other topics on this subject…but I can’t figure it out  
I’m getting this:  
**Warning** : Cannot modify header information - headers already sent by (output started at / **myaddress** /header.php:4) in **/myaddress/functions.php** on line \*\*3

\*\*functions.php first segment:

```php
<?php function redirect_to( $location = NULL ) {
        if ($location != NULL) {
            header("Location: {$location}");
            exit;
        }
    }

```

header.php just starts (and ends) with an html tag

```php
<html>
<head>
<style type="text/css">

```

and the page that gives the error goes

```php
<?php require_once("includes/session.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php require_once("includes/connection.php"); ?>
<?php include("includes/header.php"); ?>
<?php confirm_logged_in(); ?>

<html>
    <head>
        <title>Content Management System</title>    

```

is it cool to have two open and closing html tags? I really can’t figure this one out…  
there is no output in sessions.php as you can see here… so I can’t figure out what is causing the error!

```php
<?php session_start();
    
    function logged_in() {
        return isset($_SESSION['user_id']);
    }
    
    function confirm_logged_in() {
        if (!logged_in()) {
            redirect_to("login.php");
        }
    }
?>

```

please help! I know its been addressed but… :stare:
