Jump to content

todisable markup and PHP scripting in text inputs...?????


prasadc

Recommended Posts

$text = htmlspecialchars ($text);

or

$text = str_replace (">", ">", $text);

$text = str_replace ("<", "<", $text);

 

and smilies, stuff like:

$array = array ("/\: )/", "/\: P/");

$array2 = array ("<img src='smile.jpg' alt='' />", "<img src='blah.jpg' alt='' />");

$text = preg_replace ($array, $array2, $text);

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.