OK so, just trying to get through a not for profit project and full disclosure I know pretty much nothing about PHP. That being said… I wondered if one of you would be kind enough to fix this mess for me :
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Contact form</title>
<link href="ContactForm.css" rel="stylesheet" type="text/css"/>
<link href="https://fonts.googleapis.com/css?family=lobster|Lobster+Two" rel="stylesheet" >
</head>
<body>
<div class="banner">
<h1>Conact Form</h1>
</div>
<div class="navbar">
<a target="_self" href="..\mytest.html">Home </a>
<div class="dropdown">
<button class="dropbtn">Region </button>
<div class="dropdown-content">
<a target="_self" href="..\REC_Page.html">Regional Executive Council</a>
<a target="_self" href="..\RegionPages\Commissions\Commissions.html">Council and Commissions</a>
<a href="#">Calendar</a>
<a href="#">Guidelines</a>
<a href="#">Forms</a>
<a href="#">Projects</a>
<a href="#">Meditations</a>
<a href="#">Newsletter</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Families</button>
<div class="dropdown-content">
<a target="_self" href="..\Thomas.html">St Thomas More </a>
<a target="_self" href="..\Margaret.html">St. Margaret of Cortona </a>
<a target="_self" href="..\Elizabeth.html">St. Elizabeth of Hungary </a>
<a target="_self" href="..\FratMap.html"> Map</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Order</button>
<div class="dropdown-content">
<a href="#">Rule</a>
<a href="#">Constitutions</a>
<a href="#">Statues</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Vacations </button>
<div class="dropdown-content">
<a href="..\VacationsPages\.html">Come and See </a>
<a href="..\VocationsPages\.html">Formation</a>
</div>
</div>
<a target="_self" href="..\EventsPage\EventListing.html">Events</a>
<a target= "_self" href="..\contact\contactform.html">Contact Us </a>
<a target= "_self" href="..\form.html">Prayer Requests</a>
</div>
<div class="main">
<div class="navigation">
<div class="groupHolder">
<a href="#">Home</a>
</div>
<div class="groupHolder">
<a href="#">Region</a>
<div class="dropdown-content">
<a target="_self" href="#">Regional Executive Council</a>
<a target="_self" href="Commissions.html">Council and Commissions</a>
<a href="#">Calendar</a>
<a href="#">Guidelines</a>
<a href="#">Forms</a>
<a href="#">Projects</a>
<a href="#">Mediations</a>
<a href="#">Newsletter</a>
</div>
</div>
<div class="groupHolder">
<a href="#">Family</a>
<div class="dropdown-content">
<a href="#"> Thomas </a>
<a href="#">Margaret </a>
<a href="#"> Elizabeth</a>
</div>
</div>
<div class="groupHolder">
<a href="#"> Order</a>
</div>
<div class="groupHolder">
<a href="#"> Events </a>
</div>
<div class="groupHolder">
<a href="#"> Vacations</a>
<div class="dropdown-content">
<a href="#">Come visit </a>
<a href="#">Formation </a>
</div>
</div>
<div class="groupHolder">
<a href="#"> Contact US</a>
</div>
<div class="groupHolder">
<a href="#"> Requests</a>
</div>
</div>
<form action="/action_page.php" method="post">
<p>First Name : </p>
<input type = "text" name="firstN" size="15">
<p>Last Name : </p>
<input type = "text" name="lastN" size ="25"> <br> <br>
<p>Email : </p>
<input Type="email" name="email" size"50" > <br> <br>
<p>Phone number : </p>
<input type="tel" name="phone" pattern="[0-9]{3}-[0-9]{2}-[0-9]{3}"><br> <br>
<p>Comments : </p><br>
<textarea name = "comments" rows="10 " cols ="80" >Comments :</textarea> <br> <br>
<input type="submit" value="send">
/* begin test*/
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer-master/src/Exception.php';
require 'PHPMailer-master/src/PHPMailer.php';
require 'PHPMailer-master/src/SMTP.php';
if(isset($_POST["submit"]))
{
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 2;
$mail->SMTPAuth = TRUE;
$mail->SMTPSecure = "tls";
$mail->Port = 587;
$mail->Host = "smtp.gmail.com";
$mail->Username = "myemail@gmail.com";
$mail->Password = "mypassword";
$mail->IsHTML(true);
$mail->AddAddress('ffmr.contac@gmail.com');
$mail->setFrom($_POST['email'],$_POST['firstN'] $_POST['lastN']);
$mail->Subject = "Contact from FFMR Regional Website";
$content ="<p> <b>Contact from the FFRM Regional Website : </b> </p><p>Name: .$POST_[firstN] .$POST_[lastN]<p></br><p>Email address: .$POST_[email]</p></br> <p>Message: ".$POST_[comments] </p>";
$mail->MsgHTML($content);
if(!$mail->Send()) {
echo echo "Fail - " . $mail->ErrorInfo;
var_dump($mail);
} else {
echo "Email sent successfully";
}
}
?>
</form>
</div>
</body>
</html>