I wanted to add a php form that sends a message with a name and email of the one who sent it, this is my current html, btw i use bootstrap:
<div class="row" id="contact-padding">
<div class="col-md-12 text-center" id="contact-form1">
<form action="mail.php" method="POST">
<p></p><br><input type="text" name="name" placeholder="Име" id="formInput">
<p></p><br><input type="text" name="email" placeholder="Поща" id="formInput">
<p></p><br><input type="text" name="phone" placeholder="Телефон" id="formInput">
<p></p><br>
<textarea name="message" rows="6" cols="25" placeholder="Запишете съобщението, което искате да изпратите." ></textarea><br/><br>
<input type="submit" value="Изпрати" id="send">
<input type="reset" value="Изчисти" id="send">
</form>
</div>
</div>
</div>
This is the PHP script that i use for this html:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$formcontent=" From: $name \n Phone: $phone \n Message: $message";
$recipient = "zombaza@abv.bg";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
Everytime i try to send the message, it just opens the php file on a new page and i dont receive the email on "zombaza@abv.bg"
I've tried a couple of things but they dont seem to work and it is really important that i finish this job so if somebody has an idea, please share it with me, i would be really thankful!