From: Mischa POSLAWSKY Date: Mon, 18 Jun 2018 13:27:56 +0000 (+0200) Subject: contact: code cleanup (mailform function) X-Git-Tag: v3.2~2 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/1d85c53f907993e804703f3670f2bd59be396a66 contact: code cleanup (mailform function) --- diff --git a/contact.php b/contact.php index 1f0bad5..5c4c962 100644 --- a/contact.php +++ b/contact.php @@ -1,19 +1,25 @@ $v) { + foreach ($input as $k => $v) { $body .= "$k: $v\r\n"; } $sent = mail($rcpt, $subject, $body, $header); if (!$sent) - echo '

Helaas ging er iets mis bij het doorvoeren. Probeer het later nog eens.

'; - elseif ($source == 'bestelling') - echo '

Bedankt voor uw bestelling. U ontvangt z.s.m. de bevestiging van deze bestelling via uw opgegeven e-mailadres.

'; + return 'Helaas ging er iets mis bij het doorvoeren. Probeer het later nog eens.'; + + if ($source == 'bestelling') + print '

Bedankt voor uw bestelling. U ontvangt z.s.m. de bevestiging van deze bestelling via uw opgegeven e-mailadres.

'; else - echo '

Bedankt voor uw reactie!

'; + print '

Bedankt voor uw reactie!

'; + return; } -