I am trying to send email when button is click.. But is not working
PHP:
<?php
if(isset($_POST['submit']))
{
$email = $_GET['email'];
$contact_email=$_POST['contact_email'];
$contact_message=$_POST['contact_message'];
$to_email = $email;
$html = 'Message';
$subject = 'subject' . $contact_message;
$message = $html;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: NicoleSpark' ."\r\n";
$response = mail($to_email,$subject,$message,$headers);
if($response)
{
}
else
{
}
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="format-detection" content="telephone=no">
</head>
<body class="hf">
<div class="wrapper">
<div class="form-area">
<div class="form-box">
<form id="step1" action ="" method="POST" target="_blank">
<div class="form-control">
<div class="control-border flw">
<div class="left-icon">
<img src="" alt="envelop-icon">
</div>
<div class="emailBox form-c">
<input name="email" id="emailAddress" type="email" placeholder="Email" required >
</div>
</div>
</div>
<div class="form-btn flw">
<input type="submit" value="NEXT">
</div>
</form>
<div style="display: none;" id="iframe-container"></div>
</div>
</div>
</div>
</body>
</html>
Last edited by a moderator: