My mailer form isn't works. If it possible please take a look and give me some answer to make it work. <3
Here is the PHP:
<?php
if($_POST) {
$EmailFrom = "blah";
$EmailTo = "blah";
$Subject = "blah";
$Name1 = $_POST['Name1'];
$Name2= $_POST['Name2'];
$Name3 = $_POST['Name3'];
$Name4 = $_POST['Name4'];
$Name5 = $_POST['Name5'];
$Email = $_POST['Email'];
$TeamName = $_POST['TeamName'];
$Message = $_POST['Message'];
$Body = "";
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Player1: ";
$Body .= $Name1;
$Body .= "\n";
$Body .= "Player2: ";
$Body .= $Name2;
$Body .= "\n";
$Body .= "Player3: ";
$Body .= $Name3;
$Body .= "\n";
$Body .= "Player4: ";
$Body .= $Name4;
$Body .= "\n";
$Body .= "Player5: ";
$Body .= $Name5;
$Body .= "\n";
$Body .= "TeamName: ";
$Body .= $TeamName;
$Body .= "\n";
$Body .= "Megjegyzes: ";
$Body .= $Message;
$Body .= "\n";
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
}
?>
I tried many methods but seems like I don't really know something. In HTMLI used this method:
Here is the HTML:
<form action="contact.php" class="contact-form" method="post">
<div class="row">
<div class="col-md-6">
<input type="text" name="Name1" class="form-control" id="name1" placeholder="Játékos 1">
<input type="text" name="Name2" class="form-control" id="name2" placeholder="Játékos 2">
<input type="text" name="Name3" class="form-control" id="name3" placeholder="Játékos 3">
<input type="text" name="Name4" class="form-control" id="name4" placeholder="Játékos 4">
<input type="text" name="Name5" class="form-control" id="name5" placeholder="Játékos 5">
<p> Még <strong> 16 </strong> csapat számára van hely! </p>
</div>
<div class="col-md-6">
<input type="email" name="Email" class="form-control" id="Email" placeholder="Email">
<input type="text" name="TeamName" class="form-control" id="TeamName" placeholder="Csapatnév">
<textarea class="form-control" id="Message" rows="25" cols="10" placeholder=" Megjegyzés (nem kötelező)"></textarea>
<button type="button" class="btn btn-default submit-btn form_submit">Jelentkezés</button>
<p> A jelentkezéssel elfogadjátok a verseny szabályzatát és feltételeit. </p>
</div>
</div>
</form>
What can be wrong? Thanks for your reply!