|
Hmm you could always try htmlspecialchars() - it's a string function in PHP that replaces HTML characters like < with codes like <.
To use it:
$inputString = htmlspecialchars($inputString);
then you can just go ahead and add it to your database. If you want to check to see if anything's changed (ie: if there is HTML in the post):
$htmlString = htmlspecialchars($inputString);
if($htmlString != $inputString){
echo "There is HTML in the string";
} else {
echo "There is no HTML in the string";
}
I hope this helps,
Dan
__________________
------------------------------------------
Dan - www.shneak.com
|