Sindbad~EG File Manager

Current Path : /home/u625735752/domains/bethelbloomsschool.org/public_html/
Upload File :
Current File : /home/u625735752/domains/bethelbloomsschool.org/public_html/process_enquiry.php

<?php include 'all-list.php' ?> 
<?php
// Get form data
$name = htmlspecialchars($_POST['name']);
$phone = htmlspecialchars($_POST['phone']);
$message = htmlspecialchars($_POST['message']);

// Email details
$to = ' foreach ($contactDetails['emails'] as $email):  echo $email; ?>'; // Replace with your email address
$subject = ' echo $navbar['brandAlt']; endforeach;  Web Enquiry ' . $name;
$headers = "From: no-reply@example.com\r\n"; // Replace with a valid sender email address
$headers .= "Reply-To: $phone\r\n";
$headers .= "Content-Type: text/plain; charset=UTF-8\r\n";

// Email body
$body = "Name: $name\n";
$body .= "Contact No.: $phone\n\n";
$body .= "Message:\n$message";

// Send email
if (mail($to, $subject, $body, $headers)) {
    // Redirect to index.php with success parameter
    header('Location: index.php?status=success');
    exit();
} else {
    // Redirect to index.php with error parameter
    header('Location: index.php?status=error');
    exit();
}
?>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists