Hello everyone ,
i have a problem with my contact Form ....
Ι fill in the fields of the contact form and click send.
The mail goes normally but blank. Without any of the data I put in the fields.
Look my Code.
sendemail.php File
<?php
$name = $_POST['name'];
$from = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$to = 'info@geapellas.gr';//replace with your email
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/plain; charset=iso-8859-1";
$headers[] = "From: {$name} <{$from}>";
mail($to, $subject, $message, $headers);
die;
Html Contact index File
<form id="main-contact-form" name="contact-form" method="post" action="sendemail.php">
<div class="form-group">
<input type="text" placeholder="Όνομα" class="form-control" name="name" id="name">
</div>
<div class="form-group">
<input type="email" placeholder="Email" class="form-control" name="email" id="email">
</div>
<div class="form-group">
<input type="text" placeholder="Θέμα" class="form-control" name="subject" id="subject">
</div>
<div class="form-group">
<textarea rows="6" placeholder="Μήνυμα" class="form-control" name="message" id="message"></textarea>
</div>
<button type="submit" id="contact-submit" class="btn btn-primary">Αποστολή</button>
</form>
Can someone find the problem please ?
Thanks