Jump to content

Header function is not working in the host server


co.ador

Recommended Posts

this is the warning error it's trowing

 

<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home3/nyhungry/public_html/includes/header.php:7) in <b>/home3/nyhungry/public_html/step2.php</b> on line <b>14</b><br />

there is a header sent in header.php which is included in step2.php but i don't know how the host server is set up to accept one hearder when in my local wamp server it accept several header. Any way how can that be fixed?

 

i will try the double quotes

 

header.php

 

<!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" />
<link type="text/css" href="stylesheets/main.css" rel="stylesheet" media="all" /> 
<script type="text/javascript" src="scripts/prototype.js"></script>
<script type="text/javascript" src="scripts/rating.js"></script>
<!--[if IE 5]><link rel="stylesheet" type="text/css" href="stylesheets/ie-5.0+5.5.css" /><![endif]-->
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="stylesheets/ie-6.0.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="stylesheets/ie-7.0.css"/><![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" href="stylesheets/ie-8.0.css"/><![endif]-->
<title>www.lala.com</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
(
function()
{
  var default_image = $('td.largethumb img').attr('src');
  $('table.smallthumbs a').mouseover(function() { $('td.largethumb img').attr('src', $('img', this).attr('src')); });
});
</script>
</head>
<body>
<?php include_once("includes/usersOnline.class.php");?>
<?php require_once("includes/connection.php");?>
<?php require_once("classes/include.all.php");?>
<?php require_once("includes/functions.php");?>
<div id="sidebar1">
<h1><a href="index.php" title="nyhungry.com">ny.hungrylogo</a></h1>
<ul id="mainNav">
      <li class="home"><a href="index.php" title="All inside lala.com" class="first">Home</a></li>
                <li id="takeouts"><a href="step1.php" title="Information abouts">Contact Us</a></li>
             

 

step3.php

 

<?php include("includes/header.php");?>
<div id="tresdos"><?php
$name = $_POST['username'];
$email = $_POST['email'];
$text = $_POST['message'];
//TO, Subject, Message, Header
mail('[email protected]','Contact us Message',$text,'From:'.$name.'<'. $email.'>');
header("location: step3.php");?></div>
<?php mysql_close($connection);?>
<?phpDatabase::DeInitialize();?>
<?php include("includes/footer.php");?>

 

i have taken all the white space before and after php tags and still displaying this warning

 

<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home3/lala/public_html/includes/header.php:6) in <b>/home3/lala/public_html/step2.php</b> on line <b>8</b><br />

</div>

The file phpdatabase.php could not be found.

 

don't get why

 

any help?

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.