networkthis Posted May 3, 2008 Share Posted May 3, 2008 In my forms fields are currently accepting invalid characters, I would like to know the best method for getting rid of these characters in my forms. “”;;”””?#$$%%&&+… Quote Link to comment Share on other sites More sharing options...
sasa Posted May 3, 2008 Share Posted May 3, 2008 <?php $a='$'; if(preg_match('/[“”;;”””?#$$%%&&+]/', $a, $b)) echo 'error'; else echo 'ok'; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.