Jump to content

[SOLVED] Cannot add header information - headers already sent


srinivas6203

Recommended Posts

Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\mysites\includes\header.php:9) in c:\apache\htdocs\netzgatecom1\user_check.php on line 60

 

I got this type of error frequently

 

my script:

 

<?php

include "includes/config.php";

include "includes/header.php";

include "includes/contact_left.php";

?>

<style type="text/css">

      .yregfloathelp {

              border: 1px solid black;

  /*padding: 5px 5 5 5px; */

              background-color:#ffffff;

              text-align:center;

              color: black;

              width: 18em;

              font-size: 11px;

              font-family: arial, sans-serif;

      }

</style>

<div id="rightSide"><hr />

<div class="title2">.: User login</div>

<div class="text2"><p>

<table border="0" cellpadding="0" cellspacing="0" width="100%">

<tr><td colspan="6" align="center">

<?

extract($_POST);

$lang_error = "<center>The following errors were found:</center><br>";

$lang_nouser = " <font color='#a10036'>You did not enter your username</font>";

$lang_usernotexist = " <font color='#a10036'>Username does not exist in our dtabase.</font>";

$error_colour = "red";

if (empty ($_POST['username_for']))

{

$error = "1";

$info_error .= $lang_nouser . "<br>";

}

$checkuser = "SELECT username FROM i_users WHERE username='$_POST[username_for]'";

$resultcheck = mysql_query($checkuser, $db_conn) or die ('query failed');

//if (mysql_num_rows($resultcheck) >0)

$row=mysql_fetch_array($resultcheck);

if($row['username']!=$_POST['username_for'])

{

$error = "1";

$info_error .= $lang_usernotexist. "<br>";

}

else

{

$user=$_POST['username_for'];

$_SESSION['user']=$user;

    }

if ($error == "1")

{

$info_notice = "<span style=\"color: " . $error_colour . "; font-weight: bold;\">" . $lang_error . "</span><br>";

 

if (empty ($submit))

{

$info_error = "";

$info_notice = $lang_notice;

}

}

else

{

header('location:forgot2.php');

}

?>

<form action="" method="post"  name="c">

<table align="center" border="0" width="50%" cellpadding="0" cellspacing="0" style="border:1px solid #000000;">

<tr bgcolor="#525252"><td colspan="4" align="center"><b><font style="font-size:11px; color:white;">Confirm your Username</font></b></td></tr>

<tr><td colspan="4"> </td></tr>

<tr><td colspan="4" align="center"><?php echo $info_error ?></td></tr>

<tr><td colspan="4"> </td></tr>

<tr><td align="center">User Name </td>

<td align="center"><sup><font color="red"><b>*</b></font></sup><input type="text" name="username_for" style="border: 1px solid black;width: 150px;background:white;font: 11px verdana, sans-serif;color:#443;padding:3px;margin-bottom:4px;outline:none;"> <!-- popup -->

<font class="text" style="cursor:pointer;" onMouseOver="showRollTip('<b><div style=padding-bottom:0px><b></div>Enter correct user name. This is case sensitive.',event,'white', 275, null);" onMouseOut="hideRollTip()"><img src="images/help.gif" border="0" align="baseline" /> </font>

<!-- popup end -->

</td></tr>

<tr align="center" valign="bottom"><td colspan="4"> </td></tr>

<tr><td colspan="2" align="center">

<input type="submit" name="submit" value="submit" style="width:80px; font-size:11px; font-family:Arial, Helvetica; color:black; background:white; font-weight:bold; border:1px solid black;" />

</td></tr>

<tr><td colspan="4"> </td></tr>

</table>

</form>

</td></tr></table>

</p>

</div>

</div>

<?

include "includes/footer.php";

?>

 

 

can any one help me

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.