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. 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 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
Archived
This topic is now archived and is closed to further replies.