...

View Full Version : How Preventing HTML Tag go in Database?



doomz
09-27-2006, 03:03 AM
I have a some problem. when user maybe suddenly or not inserting some word like "<table>" or some other 'html' or 'java script' tag. this will cause the whole webpage error or display change.

how to prevent this thing?

I try to using regular expression to change the input before save into data base but I'm not good in regular expression syntax. it confuse me T_T

please help ^_^ or any other solution?

Fumigator
09-27-2006, 05:48 AM
strip_tags() (http://us3.php.net/manual/en/function.strip-tags.php)

kreoton
09-27-2006, 07:16 AM
also look at function htmlspecialtags() (http://lt.php.net/manual/en/function.htmlspecialchars.php)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum