I use wordpress for my website. Then i created a form which send e-mail that contains critics and suggestion. The message is sent but i can't get the critics/suggestion value from input.
<?php
$myemail = '';//<-----Put Your email address here.
$email = $_POST['email'];
$comment = $_POST['message'];
if(isset($_REQUEST['submit']))
{
$to = $myemail;
$email_body = "Ada kritik dan saran dari seseorang!.\n".
"Pengirim: $email \n".
"Pesan:\n $comment";
mail($to,"Kritik dan Saran",$email_body);}
add_filter ('the_content', 'guerrilla_add_post_content', 0);
function guerrilla_add_post_content($content) {
if (is_single()) {
$content .= '
<div class="guerrillawrap">
<h5 style="
margin-bottom: 20px;
margin-top: 0;
">Bantu tingkatkan kualitas review dan artikel TerasGame dengan mengirimkan Kritik & Saran</h5>
<form method="POST" action="" name="contact_form" enctype="text/plain">
<input type="text" name="email" style="
width: 29%;
" placeholder="E-mail Kamu" value=""><input type="text" name="message" value="" style="
width: 70%;
/* text-align: center; */
float: right;
" placeholder="Tulis Kritik dan Saranmu di sini...">
<input type="submit" name="submit" style="
width: 100%;
margin-top: 10px;
text-align: center;
float: right;
">
</form>
<p></p></div>
';
}
return $content;
}
?>
I've tried a lot of ways, and I've sent a lot of emails from the form, but they are same, no message and email input value. Thanks.