I Was doing some research on YouTube to help me do a form for a website I am working on. The goal is to have the form send the information to my personal email address when the person submits the form. Here is a test run I am doing but when I press send form I am not receiving anything from my personal email address.
Thank you.
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<main>
<p>Send email</p>
<form class="contact-form" action="contactform.php" method="post">
<input type="text" name="name" placeholder="full name"><br>
<input type="text" name="mail" placeholder="your email"><br>
<input type="text" name="subject" placeholder="subject"><br>
<input type="text" name="name" placeholder="full name"><br>
<textarea name="message" rows="8" cols="80"></textarea><br>
<button type="submit" name="submit0 ">SEND MAIL</button>
</form>
</main>
<?php
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$subject = $_POST['subject'];
$mailFROM = $_POST ['mail'];
$message = $_POST ['message'];
$to_email= "kenneth2461@hotmail.com";
$headers = "From: ".$mailFrom;
$txt = "You have received an email from ".$name.".\n\n".$message;
mail($mailTo, $subject, $txt, $headers);
header("Location: index.html?mailsend");
}
?>
</body>
</html>