Good day,
I would like to ask the most efficient way to clean (remove HTML tags, and other formatting) the input data.
Something to add to:
stripslashes(strip_tags(htmlentities($_POST['val'])))
-Michaeru
Help - Cleaning Input Data
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: Help - Cleaning Input Data
Regular Expressions are probably your best bet.
For most projects I dont strip tags. Use htmlentities() when you display the text and it should render exactly what was typed.
For most projects I dont strip tags. Use htmlentities() when you display the text and it should render exactly what was typed.