So i have designed a PHP email system following some tutorials and was does it work? I've installed XAMPP and named the index (Index.php) so that the php should work, when when testing it on Localhost it doesn't send what's in the field 'email' like it should be doing. Any help/advice please.
<?php
if(!empty($_POST["email"])) {
if(checkEmail(strip_tags(trim($_POST['email'])))) {
$to = 'freemanstreetwifi@gmail.com';
$msg = strip_tags(trim($_POST['email']));
if(!($mail = mail($to, $msg, "Wifi Email", $msg))) {
echo "<center> Email Failed </center>";
}
} else {
echo "<center> Email Failed </center>";
}
}
?>