if ($_SERVER['REQUEST_METHOD'] == 'POST') { $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; // Send the email to the admin (configure PHP mail settings) $to = "admin@yourwebsite.com"; // Replace with your admin email $subject = "Contact Form Submission from $name"; $body = "You have received a new message from the contact form:\n\n"; $body .= "Name: $name\nEmail: $email\n\nMessage:\n$message\n"; $headers = "From: $email"; if (mail($to, $subject, $body, $headers)) { echo "Thank you for contacting us. We will get back to you soon."; } else { echo "Error sending message."; } } ?> Contact Us E-commerce Store

Contact Us