Jump to content

Guestbook.. txt file


phalanx101

Recommended Posts

Hi

 

My brief is pure php guestbookm, using a txt file as storage...

 

I have thus far managed to create a simple guestbook which you can enter comments in. However implimenting anything futher has met with failure.

 

swearword filter, or even detecting the user not entering all the fields doesn't work...

 

function antiSwear($userComment) { 
// example array, possible to link to text file so that code is cleaner
    $swearWords = array("fuck","shit","dickhead","fart"," foul ");
$newcomment = str_replace($swearWords,"****",$userComment);
    return $newComment; 

 

Any tips regarding this? As most examples are mySQL.

 

Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/37081-guestbook-txt-file/
Share on other sites

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.