I have tried this line ((isset($_POST["comment"]))?(strip_tags ($str, "remove","<img>"($_POST["comment"]))):"") which doesn't work still. I am stuck here, any suggestions. The only html I want to allow is <a href> and <p>... but no images or scripts.