I am trying to send an email when the 'Send Email' button is pressed, but the following code won't send anything to my email:
<!DOCTYPE html>
<html>
<form action="email.php" method="post">
<input value="Send Email" name="email" type="submit">
</form>
<?php
if (isset($_POST['email'])) {
$msg = 'hello';
mail('example@gmail.com', 'Sample', $msg);
}
?>
</html>
Any idea on how to make it work?