I've just to put together my very first little web application project in PHP and I have a couple of questions.
The first isn't that important because it's no where near finished yet but the help would be appreciated. Can those who have the time visit http://www.array-media.com/WebDev/TestClassifieds/ and let me know what I need to work on to make this easier to use etc. I know it's broken all over the place but I'd like some outside input before I start to polish this turd on the weekend. The second question is the real one. Because this site may eventually be put onto the web as an unmoderated site, I was wondering what would be the best way to test the users input for inappropriate content (Bad words). I was thinking of using a table in MySql containing the questionable words and basically break up the users input, search through the Db and if it returns a positive, dump the offender to an error page reporting the rejected word found. This seemed like a hell of a lot of overhead (breaking up the string, opening a connection to the database, searching the database, creating the custom error page, closing the connection, etc.) for such a simple task. I also thought of doing it from within the script using something like strtok(), or str_replace() to loop through and compare the users input string to an array of the bad words (I'm thinking 20-30 depending on how creative my friends and I get). So which is faster, smarter, better? What else could I use to accomplish this task? I kinda like the MySql option myself seems easier to deal with for some reason Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php