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]);
?>




Commentaires

Posts les plus consultés de ce blog

XAJAX with PHP – The future of web development

XAJAX with PHP – The future of web development

Database connection pooling in ADO.Net