Help with Form sending email message error

The web Form sends the messages successfully, but shows these errors:

“Notice: Undefined variable: message in /home/public_html/submit.php on line 13”

“Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/submit.php:13) in /home/public_html/submit.php on line 23”

here is the ‘submit.php’ code, with the lines with errors (in bold):

	$to = '';
	$subject = 'Form';
	$name = $_POST['name'];
	$email = $_POST['email'];
	$message1 = $_POST['message'];
	$headers = $name;
	$headers = 'from:';

	**$message .= "Hello ".$_POST['name']." -  Thank you for your upload ";**
	$message1 .= "---- Name: ".$_POST['name']." ---- Email: ".$_POST['email']." ";

if( empty($_POST["some_place"]) or $_POST['some_place'] != "glory" )
   header("HTTP/1.0 403 Forbidden");
   		mail( $to, $subject, $message1, $headers );
   		mail( $email, $subject, $message, $headers );

any help with resolving the errors is appreciated

You have “$message .=”. That means, message should be already defined. But it is not.

Thanks for your reply.
I think I’ve got it

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.