Hallo, versuche seit mehreren Stunden nun verzweifelt, dieser Contact Form Leben einzuhauchen aber es passiert nichts, wenn man auf den Button klickt:
HTML
<div class="col-md-8">
<div class="contact-wrap form-style">
<h3>Contact Me</h3>
<div class="cf-msg"></div>
<form action="mail.php" method="send" id="cf">
<div class="row">
<div class="col-sm-6 col-xs-12">
<input type="text" placeholder="Name" id="fname" name="fname">
</div>
<div class="col-sm-6 col-xs-12">
<input type="text" placeholder="Email" id="email" name="email">
</div>
<div class="col-xs-12">
<input type="text" placeholder="Subject" id="subject" name="subject">
</div>
<div class="col-xs-12">
<textarea class="contact-textarea" placeholder="Message" id="msg" name="msg"></textarea>
</div>
<div class="col-xs-12">
<button id="submit" class="cont-submit btn-contact" name="submit">SEND MESSAGE</button>
</div>
</div>
</form>
</div>
</div>
Alles anzeigen
Dazu habe ich folgende mail.php erstellt...
PHP
<?php
//Taking all values
$fname = $_POST['fname'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$msg = $_POST['msg'];
$output = "Name: ".$fname."\n\nSubject: ".$subject."\n\nMessage: ".$msg;
$to = 'service.talk2people@gmail.com';
$headers = 'FROM: "'.$email.'"';
$send = mail($to, $fname, $output."\n\n***This message has been sent from Martxa", $headers);
Alles anzeigen
kann mir jemand sagen, was ich falsch mache? Vielen Dank im Voraus!