disable HTML when i echo a colomb
Question:
hi users
I have a table called profile
it contains a colomb called info (TEXT)
I use print"row[info]";
The problem is that some people enter HTML and javascript
and when i use the echo it, everything shows
they can even put their google ads too!
How can i disable HTML
thanks
Answers:
Try htmlentities() function
<?
echo htmlentities(row[info]);
?>
hi users
I have a table called profile
it contains a colomb called info (TEXT)
I use print"row[info]";
The problem is that some people enter HTML and javascript
and when i use the echo it, everything shows
they can even put their google ads too!
How can i disable HTML
thanks
Answers:
Try htmlentities() function
<?
echo htmlentities(row[info]);
?>
Commentaires
Enregistrer un commentaire