t-r.de/content/php/contact.php

19 lines
748 B
PHP

<?php
//source: https://www.unixdude.net/posts/2017/Nov/29/pelican-contact-form/
if(isset($_POST['address']) && $_POST['address'] == ''){
//The form was submitted
$ouremail = 'kontakt@tobias-radloff.de';
// Important: if we add any form fields to the HTML,
// and want them included in the email, we will need to add them here also
$body = "Diese Nachricht wurde soeben durch das Kontaktformular auf t-r.de übermittelt:
Name: $_POST[name]
Emailadresse: $_POST[email]
Nachricht: $_POST[nachricht]";
// From:
$headers = "From: $_POST[email]";
// send the message
mail($ouremail, 'Nachricht ueber das Kontaktformular von t-r.de!', $body, $headers );
header('Location: /kontakt/danke/');
}
?>