Skip to content

Commit

Permalink
Create process_form.php
Browse files Browse the repository at this point in the history
  • Loading branch information
evildevill authored Oct 23, 2023
1 parent f216022 commit b0cb839
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions process_form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = $_POST["name"];
$email = $_POST["email"];
$project = $_POST["project"];
$message = $_POST["message"];

// You can customize the email content and recipient
$to = "email@example.com";
$subject = "New Contact Form Submission";
$message_body = "Name: $name\nEmail: $email\nProject: $project\nMessage:\n$message";

// Send the email
if (mail($to, $subject, $message_body)) {
echo "Message sent successfully.";
} else {
echo "Message sending failed.";
}
}
?>

0 comments on commit b0cb839

Please sign in to comment.