<?php echo htmlspecialchars($_POST['html']); if($_POST['html'] == htmlspecialchars){ return false; } ?> <form> <input type="text" name="html" placeholder="HTML special chars"> </form>