beansandsausages 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? Link to comment https://forums.phpfreaks.com/topic/92901-hey/ 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) Link to comment https://forums.phpfreaks.com/topic/92901-hey/#findComment-475896 Share on other sites More sharing options...
beansandsausages 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. Link to comment https://forums.phpfreaks.com/topic/92901-hey/#findComment-475900 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 Link to comment https://forums.phpfreaks.com/topic/92901-hey/#findComment-475908 Share on other sites More sharing options...
beansandsausages 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 ... Link to comment https://forums.phpfreaks.com/topic/92901-hey/#findComment-475915 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? Link to comment https://forums.phpfreaks.com/topic/92901-hey/#findComment-475916 Share on other sites More sharing options...
beansandsausages 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. Link to comment https://forums.phpfreaks.com/topic/92901-hey/#findComment-476912 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.