Ich versuche, die Werte aus einem Formular zu ziehen und per E-Mail zu senden. Es sendet derzeit nur den $ to- und $ subject-Wert, sendet aber nicht die Header- oder Body-Komponenten. Jede Hilfe wäre willkommen. Formularcode:Ziehen von Werten aus einem Formular mit PHP
<body>
<div class="form-style-6" >
<h1> <img src="../assets/img/navBar_logo.png" style = " padding- top: 20px; padding-right:30px; padding-left: 20px;"> Contact Manager</h1>
<form action="contactform_email.php" method="get" name="f1">
<input type="text" name="name" placeholder="Name" />
<input type="text" name="email" placeholder="Email" />
<textarea name="message" placeholder=""></textarea>
<input type="submit" value="Send" />
</form>
</div>
</body>
and the PHP to pull the values
<?php
$to = "[email protected]";
$subject = "Contact Manager";
$headers = "Reply-To: ".$_GET['email'];
$body = "Name : ". $_GET['name']."\n".
"Email : ". $_GET['email']."\n".
"Message : ". $_GET['message']."\n".
mail($to, $subject, $body, $headers);
?>
<b>Thank you for applying online! The apartment manager will get back to you shortly.</b>
Verwenden Sie Post anstelle von get. – C2486