Skip to content

Instantly share code, notes, and snippets.

@umidjons
Created July 4, 2013 04:49
Show Gist options
  • Save umidjons/5925001 to your computer and use it in GitHub Desktop.
Save umidjons/5925001 to your computer and use it in GitHub Desktop.
Accept form values safer with htmlspecialchars()
<?php
$someValue = isset( $_REQUEST[ 'VALUE' ] ) ? htmlspecialchars( $_REQUEST[ 'VALUE' ], ENT_QUOTES, 'utf-8' ) : '';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment