eldorik Posted September 24, 2007 Share Posted September 24, 2007 Hey. Does anyone know how to only allow specific characters in a form input? I only want my users to have their names with letters A-Z and numbers 0-9 and not other symbols like * & ^ $ and so on. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/70410-solved-restricting-characters-in-a-form/ Share on other sites More sharing options...
darkfreaks Posted September 24, 2007 Share Posted September 24, 2007 ereg_replace($username,$pattern,$replace); $username=$_POST[username]; $pattern="*^$%&()#@!"; $replace=""; and so on Quote Link to comment https://forums.phpfreaks.com/topic/70410-solved-restricting-characters-in-a-form/#findComment-353759 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.