Jump to content

security for my php forum


silverglade

Recommended Posts

hi, i made a web forum message board and someone posted porn words on it so i had to remove the forum from my server.

i need a way  to delete posts, email registratoin and password, and block porn keywords in the messages. does anyone know of a link that teaches this.?

i cant find one , only for password. any help greatly appreciated. thanks . derek

Link to comment
https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/
Share on other sites

I think it would make more sense to catch these things before you put them into your DB. Preg_replace() would probably be the best method of doing this. On your insert query, do something like this:

$badwords = array("porn", "meecrab");
qry = "INSERT INTO table (Content) VALUES ('".preg_replace($badwords, "@$#!", $content)."')";

 

The SQL I posted is how you are supposed to delete his posts. Or, if he used the same name in all the posts, use that as the criteria for the deletes.

 

If you want to visually delete them, you can get the MySQL Administrator Tools:

http://dev.mysql.com/downloads/gui-tools/5.0.html

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.