Page 1 of 1

Preventing HTML from Entering Database

Posted: Wed Jul 23, 2003 9:22 pm
by Caped Knight
Is there an easy way to prevent people from entering HTML into my database other than ereg() and ereg_replace()?

Thanks.

Posted: Wed Jul 23, 2003 9:30 pm
by qads
htmlspecialchars();

Posted: Wed Jul 23, 2003 11:00 pm
by Caped Knight
Thanks, qads.

Posted: Thu Jul 24, 2003 3:41 am
by patrikG
Also, have a look at strip_tags.