Menu
I am using PHP for my user registratiOn. While i was trying to Validate user informatIOn using server side I gOt sOMe prObLems. BeLOw is the piece Of cOde.
[code=php]function validate() {
$errors;
$errorMsg;
if ($_POST[‘txtFName’].length < 4) {
$errorMsg += “Firs name must contain atleast 4 charecter<br/>”;
$errors += 1;
}
else
$errors = 0;
echo “$errorMsg”;
}
I want tO get the Length of the string. What is the cOde fOr it. Is that cOrrect which I have used $var.length ??
It didnOt wOrk & nO errOr mesages are cOming.
How can I get the Length of an string/variabLe?????