twilightnights Posted January 30, 2007 Share Posted January 30, 2007 I have a site that has users submit information which will displayed on a site, but I want to prevent them from posting html code, mainly <img src="blah.jpg"> so that they don't link nasty pictures or anything. Is there an easy way to avoid that? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 30, 2007 Share Posted January 30, 2007 strip_tags() Quote Link to comment Share on other sites More sharing options...
HuggieBear Posted January 30, 2007 Share Posted January 30, 2007 PHP has a few built in functions for this kind of thing, and there's also regular expressions. Check the php manual for [url=http://uk.php.net/manual/en/function.strip-tags.php]strip_tags()[/url].RegardsHuggie Quote Link to comment Share on other sites More sharing options...
twilightnights Posted January 30, 2007 Author Share Posted January 30, 2007 Cool, ty. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.