...

View Full Version : Charicter lenght validation



TrainReq
03-20-2007, 11:44 PM
What is the query to run to check if a posted value is 3 charicters or longer...

for example:

If posted value in password feild is longer than 3 charicters.. echo "Valid!" if not echo "Invalid!"

how do i do that?

firepages
03-21-2007, 12:30 AM
<?php
if(strlen($_POST['fieldname']) < 3){
echo 'error';
}
?>


& its Character ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum