derrida
asked on
header problem
Hi
i have a contact form. when i send it i get:
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\or_02\contact. php:290) in C:\wamp\www\or_02\contact. php on line 376
this is the most basic things.
the code is attached.
best regards
ron
i have a contact form. when i send it i get:
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\or_02\contact.
this is the most basic things.
the code is attached.
best regards
ron
if(isset($_POST['submit'])){
$to = "me@gmail.com";
$subject = $_POST["email_subject"];
$message = $_POST["email_msg"];
$from = $_POST["email_email"];
$headers = "From: $from";
$domail = mail($to,$subject,$message,$headers);
if($domail){
header('Location: contacthanks.php');
}else{
echo "not ok";
}
}
This error usually means that you have a blank line at the beginning of your script. If so, remove it.
derrida,
what's the file type? plain text/UTF8 ?
if UTF8, it's mostly because of the byte order mark cause.
https://www.experts-exchange.com/questions/24037516/error-retrieve-session-data-from-UTF8-file.html
please read id 23333523
what's the file type? plain text/UTF8 ?
if UTF8, it's mostly because of the byte order mark cause.
https://www.experts-exchange.com/questions/24037516/error-retrieve-session-data-from-UTF8-file.html
please read id 23333523
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks