Warning: Cannot modify header information - headers already sent by (output started a

i am getting this error in my php script can anyone help?

Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\Connections\hi.php:12) in c:\program files\easyphp1-8\www\sign up.php on line **38

and line 38 is this
-----header("Location: ". $MM_redirectLoginSuccess );

my code in php is below
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}

$loginFormAction = $_SERVER[‘PHP_SELF’];
if (isset($_GET[‘accesscheck’])) {
$_SESSION[‘PrevUrl’] = $_GET[‘accesscheck’];
}

if (isset($_POST[‘user_type’])) {
$loginUsername=$_POST[‘user_type’];
$password=$_POST[‘user_password’];
$MM_fldUserAuthorization = “”;
$MM_redirectLoginSuccess = “67Microsoft Word - kebabs.pdf”;
$MM_redirectLoginFailed = “Sign Up.php”;
$MM_redirecttoReferrer = true;
?>
<?php require_once(‘Connections/hi.php’); ?>

<? mysql_select_db($database_hi, $hi);
$LoginRS__query=sprintf(“SELECT user_type, user_password FROM userrecords WHERE user_type=’%s’ AND user_password=’%s’”,
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));

$LoginRS = mysql_query($LoginRS__query, $hi) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = “”;

//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;          

if (isset($_SESSION['PrevUrl']) && true) {
  $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];    
}
header("Location: ". $MM_redirectLoginSuccess );

}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
**

I had a problem with the “headers already sent” too at my [COLOR=blue]http://www.Maxi-Pedia.com[/COLOR] website. In my case, it was caused by a blank line at the beginning of one *.inc file. PHP seems to have problems with extra spaces here and there.

Check all your *.inc files to make sure you do not have closing ?> in any of them. Closing ?> is not needed in your *.inc files. Check all your *.php files to make sure you do not have blank lines at the beginning or at the end.

If you are working in a CMS, then it may be caused by some module, disable your modules one by one to find out which one causes this.

This can also be caused by UTF-8. If you have your website coded in ASCII and are saving your php files as UTF-8, it can cause this message. If your website and DB are UTF-8, you should be ok with saving php files as UTF-8 though.

Btw, this error message is related to <b>output_buffering</b> on/off in your php.ini. If you have output_buffering set to some cache, the server will allow to send headers with delay (or to modify them shortly after they are sent), and this error will not be tripped. But if you set output_buffering to 0 or not at all, then headers can be sent at only one moment, and if you have some bad code, it will trip this error message.