Hello all,

While upload my resume i'm getting below error,

Warning: Cannot modify header information - headers already sent by (output started at /home/abc/public_html/site/resume2.php:1) in /home/abc/public_html/site/resume2.php on line 57

I have attached the code as well....

<?
$subject = $_POST[subject];
$Comments = $_POST[Comments];
$name = $_POST[name];
$phone = $_POST[phone];
$mobile = $_POST[mobile];
$email = $_POST[email];

$messageproper =
"----------- MGBSS Enquiry Submission -------------------------\n\n" .
"Subject : ".$subject."\n".
"Comments : ".$Comments."\n".
"Name : ".$name."\n".
"Phone : ".$phone."\n".
"Mobile : ".$mobile."\n".
"Email : ".$email."\n".
"\n\n-------------------------------------------------------------------\n" ;

include "libmail.php";
$m= new Mail; // create the mail
$m->From( "info@abc.com" );
$m->To( "info@abc.com" );
$m->Subject( "ABC Enquiry Submission - $subject" );
$m->Body( $messageproper ); // set the body
//$m->Cc( " ");
//$m->Bcc( " ");
$m->Priority(4) ; // set the priority to Low
//$m->Attach( $target_path, "application/msword", "inline" ) ; // attach a file of type image/gif to be displayed in the message if possible
$m->Send(); // send the mail
//echo "Mail was sent:<br><pre>", $m->Get(), "</pre>";
header("location:contact.php?st=1");

?>


Please give solution for this error.

Thanks & Regards,
Muthu

Recommended Answers

All 3 Replies

you should check out the encoding

Hi elibyy,

Thank you for your kindly reply, Sorry i dont know php, Just take this code and fix it in my html page. So i can not understand what you are saying. pls copy the code and correct me what i need to do.

Thanks a lot again,

Regards,
Muthu

k first replace the code with this

<?php
$subject = $_POST['subject'];
$Comments = $_POST['Comments'];
$name = $_POST['name'];
$phone = $_POST['phone'];
$mobile = $_POST['mobile'];
$email = $_POST['email'];

$messageproper =
"----------- MGBSS Enquiry Submission -------------------------\n\n" .
"Subject	 :	 ".$subject."\n".
"Comments	 :	 ".$Comments."\n".
"Name	 :	 ".$name."\n".
"Phone	 :	 ".$phone."\n".
"Mobile	 :	 ".$mobile."\n".
"Email	 :	 ".$email."\n".
"\n\n-------------------------------------------------------------------\n" ;

include "libmail.php";
$m= new Mail; // create the mail
$m->From( "info@abc.com" );
$m->To( "info@abc.com" );
$m->Subject( "ABC Enquiry Submission - $subject" );
$m->Body( $messageproper );	// set the body
//$m->Cc( " ");
//$m->Bcc( " ");
$m->Priority(4) ;	// set the priority to Low
//$m->Attach( $target_path, "application/msword", "inline" ) ;	// attach a file of type image/gif to be displayed in the message if possible
$m->Send();	// send the mail
//echo "Mail was sent:<br><pre>", $m->Get(), "</pre>";
header("location:contact.php?st=1");

?>

second what editor r u using?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.