...

View Full Version : check this please



urgido
08-27-2006, 09:21 PM
I make a comparition.

if user_name is equal to "idiot" It's can't be register. My code:


if (strlen($_REQUEST['user_name']) == "idiot") {
echo "This username can't be register, choose other";
} else {
echo "Congratulation!";
}

Is my code right? Regards

Mwnciau
08-27-2006, 09:28 PM
Your using strlen on the username, this returns the length of the username (eg if it was idiot it would return 5). Remove that and it should work fine.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum