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):
<?php
if($_POST){
$to = 'mailer@mail1001.com';
$subject = 'Form';
$name = $_POST['name'];
$email = $_POST['email'];
$message1 = $_POST['message'];
$headers = $name;
$headers = 'from: support@websiteeeee.com';
**$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");
}else{
mail( $to, $subject, $message1, $headers );
mail( $email, $subject, $message, $headers );
}
**header('Location: https://websiteeeee.com');**
exit;
}
?>
any help with resolving the errors is appreciated