0

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

2
Contributors
3
Replies
6
Views
6 Years
Discussion Span
Last Post by elibyy
0

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

0

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?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.