Jump to content
xisto Community

RandomThoughts

Members
  • Content Count

    1
  • Joined

  • Last visited

Posts posted by RandomThoughts


  1. This will not work at all. There is no origin of content to replace from and no variable to actually echo. This would be more correct. This will be a chatbox example.

    <?php$shout=strip_tags($_POST['shout']);$shouts=str_replace("curse","replace",$shouts);//Repeat each word//mysql query?>

    That would be the correct form. Your example will simply provide an error. If it were to work it would still display the curse word due to no variable being stored.

    I think the $shout variable should be $shout and not $shouts as the parameter to the str_replace function.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.