burnside Posted February 25, 2008 Share Posted February 25, 2008 Hey, I have been using this bit of code : $word = array('arse'); $edit = array('ar*s'); $row[message] = str_replace($word, $edit, $row[message]); I was just woundering is there a way to do it via a mysql database or something? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted February 25, 2008 Share Posted February 25, 2008 how would mysql even accomplish this. If you want to sanitize nasty language either do it coming into mysql or coming out, depending of if you want the original user input in tack. Mysql doesn't handle this sort of manipulation (it can but not very straigh tfoarwadly) Quote Link to comment Share on other sites More sharing options...
burnside Posted February 25, 2008 Author Share Posted February 25, 2008 okay, thank you. I just was curious so i didnt have to open the script all the time to add more. just thought might of been away in a db or somethig. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted February 25, 2008 Share Posted February 25, 2008 why not let it cron job do it Quote Link to comment Share on other sites More sharing options...
burnside Posted February 25, 2008 Author Share Posted February 25, 2008 what you mean? its for a chat room for smily faces and bad words etc ... Quote Link to comment Share on other sites More sharing options...
revraz Posted February 25, 2008 Share Posted February 25, 2008 What is the DB actually storing, all the chat or just the filters? Quote Link to comment Share on other sites More sharing options...
burnside Posted February 26, 2008 Author Share Posted February 26, 2008 its storing all of it at the moment you submit it via a form with a srting replace. 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.