Before insert into mysql, how to make a word lenth judge ? that the custom insert each part of word must be more than 3 letters and less than 50 letters? Thanks.
//if(strlen($_POST['firstname'])>=3 & strlen($_POST['lastname'])>=3){
$firstname = htmlspecialchars(trim($_POST['firstname']));
$lastname = htmlspecialchars(trim($_POST['lastname']));
$addClient = "INSERT INTO contact (firstname,lastname) VALUES ('$firstname','$lastname')";
mysql_query($addClient) or die(mysql_error());
//}
You mean something like this?