Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

htmlspecialchars in php

<?php

The htmlspecialchars() function converts special characters to HTML 
entities. This means that it will replace HTML characters like < and > 
with &lt; and &gt;. This prevents attackers from exploiting the code by 
injecting HTML or Javascript code (Cross-site Scripting attacks) in forms.
  
?> 
 
PREVIOUS NEXT
Tagged: #htmlspecialchars #php
ADD COMMENT
Topic
Name
1+5 =