Im making a form that checks the Name input and echos results when the submit button is pressed using a IF statement. But i cant get it to work. What am i doing wrong?
<form id="AUTO"   method="post" action="" novalidate>
    <input type="hidden" name="token" value="<?php echo $token; ?>"/>
    <input type="hidden" name="miles" value=""/>
    <div id="contact_name">FULL NAME: *<br>
        <input id="element_2_1" name="name" class="element text" size="15" 
            maxlength="15" value="" type="text" placeholder="FULL NAME">
    </div>  
    <input type="submit" name="submit" class="submit action-button" value="SUBMIT" />
</form>
$Name = $_POST['Name'];
if (isset($_POST['submit'])) {
    //checks name field for a number if one exist echo has a number
    if (preg_match('|[0-9]', $Name)) {
        echo 'has a number';
    } else {
        echo 'Does not contain a number';
    }
}
 
     
     
    