From 6298891a8ac3ee367fe6a8dfb26f5c1dd4b3cc82 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sat, 7 Oct 2023 17:30:29 +0200 Subject: [PATCH] Add email field to contact form --- contact.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contact.php b/contact.php index c7e7e66..3d3ddaf 100644 --- a/contact.php +++ b/contact.php @@ -31,6 +31,9 @@ global $language, $dir, $locale; echo htmlspecialchars($_POST['name'] ?? ''); ?>" autofocus>
>
+

@@ -61,6 +64,9 @@ if($_SERVER['REQUEST_METHOD']==='POST'){ $message.= _('You haven\'t entered a message yet.').'
'; $ok=false; } + if(!empty($_POST['your_email'])){ + $headers .= "Reply-To: $name <".filter_var($_POST['your_email'], FILTER_SANITIZE_EMAIL).">\r\n"; + } if(!empty($_POST['real_subj'])){ $subject="$_POST[real_subj]"; }