After attending minute duel with google and ask to be assisted by his friends try and error. Finally over the script also check the username with the PHP function "ereg".
Kira2 like this:
if (ereg ( "^ [a-z0-9 ]+$",$ string)) (
echo "Valid";
) Else (echo "username format is not allowed !!";}
?>
how the above functions work?
if>> the function logic that is valuable if the statement is worth .. The most important here is the function ereg he will check whether the contents of the variable $ string contains string permitted by ereg itself. Namely a-z and 0-9
hopefully help!
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment