Skip to content

Instantly share code, notes, and snippets.

@yvan-sraka
Created October 21, 2016 10:01
Show Gist options
  • Save yvan-sraka/d9d7bf9c75596008d49b879da3697deb to your computer and use it in GitHub Desktop.
Save yvan-sraka/d9d7bf9c75596008d49b879da3697deb to your computer and use it in GitHub Desktop.
<?php
// ##### SECURITY #####
// Convert potential HTML content contain
// in POST data into HTML Entities
$_POST['pseudo'] = htmlspecialchars($_POST['pseudo']);
?>
<!DOCTYPE>
<html>
<form method="post" action="#">
<input type="text" name="pseudo" />
<input type="submit" value="Connexion" />
</form>
<div>
<?php echo "Bonjour ".$_POST['pseudo']." !" ?>
</div>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment