View Full Version : check this please

08-27-2006, 10: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

08-27-2006, 10: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.