I have this php form:
        <form method="post" action="mailer.php" class="contact-form-map"> 
        <div class="row">
            <input type="text" name="name" id="name" placeholder="Your Name" required>
        </div>
        <div class="row">
            <input type="number" name="number" id="number" placeholder="Contact Number" required>
        </div>
        <div class="row">
            <textarea type="text" name="message" id="message" placeholder="Message" rows="6" cols="33" required></textarea>
        </div>
        <div class="row">
            <input type="submit" class="map-button" value="Send">
        </div>
        </form>
and this is my mailer.php
<?php 
if(isset($_POST['submit'])){
    $to = "lala.lal@gmail.com"; // info@computerrepairscroydon.co.uk
    $name = $_POST['name']; 
    $number = $_POST['number'];
    $subject = "Form submission - Contact";
    $message = $name . " " . " wrote the following:" . "\n\n" . $_POST['message'] . "\n\n" . " Contact number: " . $number ;
    $headers = "From:" . $name;
    mail($to,$subject,$message,$headers);
    echo "Mail Sent. Thank you " . $name . ", we will contact you shortly.";
    header("Location: index.html?success=1#form");
    }
?>
When I enter information into de form and click send nothing happens, but the email isn't send, i don't get it on my gmail. Why is that?
 
     
    