Peki ustalarım iletişim formu çalışmıyor nerede hata yapıyorum.
Html olan tarafına böyle bir form ekledim
<section id="contact" class="contact bg-1 bg-opacity-black-70 page-section-ptb">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="section-title text-center">
<h2 class="text-blue">İletişim Bilgileri</h2>
<div class="title-line white"></div>
<p class="text-white">firma iletişim yazısı.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-md-8">
<div class="text-center">
</div>
<div id="contact-form" class="contact-form">
<form method="POST" action="mail.php" method="post">
<div class="section-field">
<i class="fa fa-user"></i>
<input id="name" type="text" placeholder="İsminiz*" required name="isim">
</div>
<div class="section-field">
<i class="fa fa-envelope-o"></i>
<input id="email" type="email" placeholder="E-Postanız*" required name="mailad">
</div>
<div class="section-field">
<i class="fa fa-file-text-o"></i>
<input id="web" class="web" type="text" placeholder="Web Adresiniz*" name="web">
</div>
<div class="section-field textarea">
<i class="fa fa-pencil"></i>
<textarea id="message" class="input-message" placeholder="Mesajınız*" required rows="7" name="mesaj"></textarea>
</div>
<button type="submit" href="javascript:void(0)" class="button mt-20">
<span>Mesajınızı Gönderin </span>
<i class="fa fa-paper-plane"></i>
</button>
</form>
</div>
</div>Mail.php sayfasını ise bu şekilde ayarladım.Farklı dosyalarıda denedim veri aktarımı olmuyor.
<?php
if(isset($_POST['submit'])){
$to = "bilgi@iletisim.com"; // this is your Email address
$from = $_POST['email']; // this is the sender's Email address
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$subject = "Form submission";
$subject2 = "Copy of your form submission";
$message = $first_name . " " . $last_name . " wrote the following:" . "\n\n" . $_POST['message'];
$message2 = "Here is a copy of your message " . $first_name . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to,$subject,$message,$headers);
mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
echo "Mail Sent. Thank you " . $first_name . ", we will contact you shortly.";
// You can also use header('Location: thank_you.php'); to redirect to another page.
// You cannot use header and echo together. It's one or the other.
}
?>
Sonuç olarak hata kodu - 405 - HTTP verb used to access this page is not allowed.
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.