hi all
is it safe/fine to use stripslashes with htmlspecialchars
for some name like O'reilyPHP Code:htmlspecialchars(stripslashes($row['username']));
actually slashes are already there in the names in database.
vineet
| SitePoint Sponsor |



hi all
is it safe/fine to use stripslashes with htmlspecialchars
for some name like O'reilyPHP Code:htmlspecialchars(stripslashes($row['username']));
actually slashes are already there in the names in database.
vineet


Yes, it is safe to do that.





No you can do it to whatever output you need to generate, just keep in mind, if you generate HTML, htmlspecialchars() will convert the HTML tags into < and > so you won't get HTML output, but rather your HTML will be shown as text on the page.
Bookmarks