Page 1 of 1

Header Error

Posted: Mon Nov 10, 2003 9:13 pm
by Vicious
hey been getting this erro just trying to setup a simple form mail function. Not very good in php but i get this error

Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/team101.net/httpdocs/DesertCombatTournament/form.php:8) in /home/httpd/vhosts/team101.net/httpdocs/DesertCombatTournament/form.php on line 32

the form code is I dont think u need the forms please post if needed.

Code: Select all

<?

//Declare the variables
$recipient = "Vicious@team101.net";
$subject = "Entry To Desert Combat Tournament";
$message = "Entry To Desert Combat Tournament
Info:
$recipient,$subject,$message,$email,$tag,$leader,$website,$server";
$subject=$_POST['subject'];

//Contents of form
$name=$_POST['teamname'];
$email=$_POST['email'];
$comments=$_POST['comments'];
$tag=$_POST['tag'];
$leader=$_POST['leader'];
$website=$_POST['website'];
$server=$_POST['server'];

//mail() function sends the mail
mail($recipient,$subject,$message); 

?>
<?
header ("http://www.team101.net/DesertCombatTournament/success.php");
?>

Posted: Mon Nov 10, 2003 10:07 pm
by SBukoski
Looks like you may have some white space before the opening <? tag. If so, remove this. No information can be sent prior to header information. White space is considered information.

Posted: Tue Nov 11, 2003 3:08 am
by twigletmac
What's on lines 1-8 of form.php?

Mac