Dobra. Mój błąd, tutaj jest kod z dwóch różnych skryptów.
Poniżej umieszczam właściwe:
HTML:
<!-- EXPANDED CONTACT FORM -->
<div class="expanded-contact-form">
<!-- FORM -->
<form class="contact-form" id="contact" role="form">
<!-- IF MAIL SENT SUCCESSFULLY -->
<span class="olored-text icon_check"></span> Your message has been sent successfully.
</h6>
<!-- IF MAIL SENDING UNSUCCESSFULL -->
<span class="colored-text icon_error-circle_alt"></span> E-mail must be valid and message must be longer than 1 character.
</h6>
<div class="field-wrapper col-md-6"> <input class="form-control input-box" id="cf-name" type="text" name="cf-name" placeholder="Imię i nazwisko">
<div class="field-wrapper col-md-6"> <input class="form-control input-box" id="cf-email" type="email" name="cf-email" placeholder="E-mail">
<div class="field-wrapper col-md-12"> <input class="form-control input-box" id="cf-subject" type="text" name="cf-subject" placeholder="Temat">
<div class="field-wrapper col-md-12"> <textarea class="form-control textarea-box" id="cf-message" rows="7" name="cf-message" placeholder="Wiadomość"></textarea>
<button class="btn standard-button" type="submit" id="cf-submit" name="submit" data-style="expand-left">Wyślij
</button> <!-- /END FORM -->
</section>
PHP (sendmail.php):
<?php
// Email Submit
// Note: filter_var() requires PHP >= 5.2.0
if ( isset($_POST['email']) && isset($_POST['name']) && isset($_POST['subject']) && isset($_POST['message']) && filter_var
($_POST['email'], FILTER_VALIDATE_EMAIL
) ) { }
// detect & prevent header injections
$test = "/(content-type|bcc:|cc:|to:)/i";
foreach ( $_POST as $key => $val ) {
}
}
$headers = 'From: ' . $_POST["name"] . '<' . $_POST["email"] . '>' . "\r\n" .
'Reply-To: ' . $_POST["email"] . "\r\n" .
//
mail( "moj@mail.pl", $_POST['subject'], $_POST['message'], $headers );
// ^
// Replace with your email
}
?>
Jak na moje oko brakuje odwołanie do pliku sendmail.php, natomiast polecnie antion nie rozwiązuje problemu. Mogę liczyć ma Wasze podpowiedzi? ]