How can I easily validate the name input on the form using bootstrap or php? I want this field to reject all numbers 0-9. Can you please help me out?
Here is the field, which is a part of the form I use:
<input class="form-control" id="name" placeholder="NAME" type="text" name="name">
And this is the php script which sends the form:
<?php
$adresdo = "info@takelake.com";
$temat = "Newsletter signup";
$zawartosc = "Imie: ".$_POST['name']."
"
."Email: ".$_POST['email']."
"
."Selected".implode($_POST['checkbox'],",");
// if the url field is empty
if(isset($_POST['url']) && $_POST['url'] == ''){
if(!$_POST['name'] || !$_POST['email']){
header("Location: error.html");
exit;
}
$email = $_POST['email'];
if(mail($adresdo, $temat, $zawartosc, 'From: Subskrybent <'.$email.'>'))
{
header("Location: ok.html");
}
}
header("Location: error.html");
?>