headers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
$var
Forum Contributor
Posts: 317
Joined: Thu Aug 18, 2005 8:30 pm
Location: Toronto

headers

Post by $var »

k, this is probably a stupid question, but i've had 2 different results and it makes no sense to me.
On my personal server, i can put a header (Location) in the body,
But on my works server, I get this error:
Warning: Cannot modify header information - headers already sent by (output started at F:\www\vhosts\honeycomb.com\httpdocs\it\user\add_it.php:1) in F:\www\vhosts\honeycomb.com\httpdocs\it\user\add_it.php on line 91
This is the loop, it's after the head:

Code: Select all

if($_POST['bpress']=="add")
	{
        $str2 = str_replace("\r\n", "<br>", $_POST['notes']);				
		$sql = "INSERT INTO it_issues (
		Issue_Title,
		Issue_Status,
		Issue_Priority,
		Issue_Dept,
		Issue_Mem,
		Issue_Type,
		Issue_Date,
		Issue_Read,
		Issue_Solution,
		Issue_Notes,
		Issue_Track,																				
		Issue_URL) 
		VALUES (
		'".$_POST["title"]."',
		'".$_POST["status"]."',
		'".$_POST["priority"]."',		
		'".$_POST["dept"]."',
		'".$_POST["mem"]."',
		'".$_POST["type"]."',
		'".$_POST["date"]."',
		'".$_POST["read"]."',								
		'".$_POST["solution"]."',
		'".$str2."',		
		'".$_POST["track"]."',		
		'".$_POST["url"]."')";
		$result = mysql_query($sql) or die (mysql_error());
		include("mail.php");
		header("Location: http://www.advantageboard.com/it/list_it.php");
		exit;
		}
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

viewtopic.php?t=1157 I gotta be in the 40's now for that...
Post Reply