getting enter to page or reload email comes without clicks the submit button

when clicks contact form page email is getting without clicks submit button and also comes while refresh the page.i wanna to be in same page while clicks submit button

my html code

    <form action="" method="post" id="commentform">
    <p class="field"><input type="text" name="author" required value="" placeholder="Name:"/><span class="required"></span></p>
    <p class="field"><input type="text" name="email" required value="" placeholder="email:"/><span class="required"></span></p>
    <p class="field"><input type="text" name="url" required value="" placeholder="Website:"/><span class="required"></span></p>
    <p><textarea name="comment"required value="" placeholder="Your comment:"/>Your comment*</textarea><span class="required"></span></p>
    <p class="comment_submit"><input name="send" type="submit" class="btn btn-primary" id="submit" tabindex="5" value="Submit Comment"/>
    <input type='hidden' name='comment_post_ID' value='65' id='comment_post_ID'/>
    <input type='hidden' name='comment_parent' id='comment_parent' value='0'/>

php code


    $author = $_POST["author"]; 
    $email= $_POST["email"];
    $url= $_POST["url"];
    $comment =$_POST["comment"]; 
    $message = "Name :".$author."n"."Email :".$email."n"."Website :".$url."n"."Comment :".$comment;
    $subject ="Visitor Enquiry";

    $to = "";
    if(mail($to, $subject,$message)){ ?>


echo "We Received Your enquiry, We'll get back to you soon";
echo "There were some errors sending enquiry, please try again";


Source: forms

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.