Please can someone assist I am new to the whole PHP thing and have simple submission form sample that is giving errors
<?php
#Receive user input
$feedback = "Email Address:" = $_POST['email_address']."\r\n"
.= "Make: " $_POST['make']."\r\n"
.= "Model: "$_POST['model']."\r\n";
$email_address = $_POST['email_address'];
#Filter user input
function filter_email_header($form_field) {
return preg_replace('/[nr|!/<>^$%*&]+/','',$form_field);
}
$email_address = filter_email_header($email_address);
#Send email
$headers = "From: The best website on the planet";
$sent = mail('john@doe.co.za', 'Feedback Form Submission', $feedback, $headers);
#Thank user or notify them of a problem
if ($sent) {
?><html>
<head>
<title>Thank You</title>
</head>
<body>
<h1>Thank You</h1>
<p>Thank you for your feedback.</p>
</body>
</html>
<?php
} else {
?><html>
<head>
<title>Something went wrong</title>
</head>
<body>
<h1>Something went wrong</h1>
<p>We could not send your feedback. Please try again.</p>
</body>
</html>
<?php
}
?>