diff options
author | Zach van Rijn <me@zv.io> | 2021-05-24 16:43:48 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2021-05-24 16:43:48 -0500 |
commit | 0a5015eec26eeebb205e860c64b5472f1f16ab41 (patch) | |
tree | 9a80182a815538093d757aa08bff93d39cf0093a /assets/php | |
download | site-ng-0a5015eec26eeebb205e860c64b5472f1f16ab41.tar.gz site-ng-0a5015eec26eeebb205e860c64b5472f1f16ab41.tar.bz2 site-ng-0a5015eec26eeebb205e860c64b5472f1f16ab41.tar.xz site-ng-0a5015eec26eeebb205e860c64b5472f1f16ab41.zip |
Initial commit. Still missing pages/content.
Diffstat (limited to 'assets/php')
-rw-r--r-- | assets/php/contact-form.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/assets/php/contact-form.php b/assets/php/contact-form.php new file mode 100644 index 0000000..f3bdfcb --- /dev/null +++ b/assets/php/contact-form.php @@ -0,0 +1,16 @@ +<?php + $name = $_POST['name']; + $email = $_POST['email']; + $message = $_POST['message']; + $to = 'your-email@example.com'; //<-- Enter your E-Mail address here. + $subject = $_POST['subject']; + + $body = "From: $name <br> E-Mail: $email <br> Message: <br> $message"; + + $headers = 'MIME-Version: 1.0' . "\r\n"; + $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; + $headers .= 'From:' . $email. "\r\n"; + $headers .= 'Cc:' . $email. "\r\n"; + + mail($to, "New Message from Website: $subject", $body, $headers); +?>
\ No newline at end of file |