note 102757 deleted from function.ctype-alnum by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: roger at cornwellinternet dot co dot uk 

----

I think your test
<?php if(!ctype_alnum(str_replace($aValid), '', $sUser)) ?>
has the brackets in the wrong place. the one after $aValid should be moved to the end. Adding a few spaces to aid legibility, should it not be:
<?php if( !ctype_alnum( str_replace($aValid, '', $sUser) ) ) ?>

Aside from that, a useful technique, thank you.
Roger Cornwell
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.