Created
October 21, 2016 10:01
-
-
Save yvan-sraka/d9d7bf9c75596008d49b879da3697deb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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