Witam, mam problem z formularzem. Otrzymuje powiadomienie na email, podaje mi nadawce i adres email osoby, ktora wyslala zapytanie, ale nie mam wiadomosci, pozostaje puste pole.
Ponizej HTML oraz PHP
<form class="userform" action="contactformsent.php" method="post" id="userForm">
<fieldset>
<label> Your Name<input type="text" name="name"/></label>
</fieldset>
<fieldset>
<label>Your Email<br/> <input type="email" name="mail"/></label>
</fieldset>
<div>
<label> Message<br/> <textarea rows="8" cols="36" form="userform" name="message"></textarea></label>
</div>
<button name="submit" type="submit" value="send">Send Message</button><br/>
</form>
<?php
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$mailFrom = $_POST['mail'];
$message = $_POST['message'];
$mailTo = "rappeu@gmail.com";
$headers = "From: ".$mailFrom;
$txt = "You received message: ".$name.".\n\n".$message;
mail($mailTo, $txt, $headers);
header("Location: contactform.php?mailsend");
}
?>