Created
January 7, 2012 14:03
-
-
Save haileys/1574821 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
<h1>Hello App</h1> | |
<?php | |
if(isset($_POST["name"])) { | |
?> | |
<p>Hello <?php echo htmlspecialchars($_POST["name"]) ?>!</p> | |
<p><a href="<?php echo $_SERVER["PHP_SELF"] ?>">try again?</a></p> | |
<?php | |
} else { | |
?> | |
<p>What's your name?</p> | |
<form method="POST"> | |
<input name="name"> | |
<input type="submit" value="go"> | |
</form> | |
<?php | |
} | |
?> |
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 if(!isset($_)) $_ = array(); | |
echo '<h1>Hello App</h1> | |
'; | |
array_push($_, $_POST); | |
$issetA = array_pop($_); | |
array_push($_,'name'); | |
array_push($_, isset($issetA[array_pop($_)])); | |
if(array_pop($_)) { | |
echo ' <p>Hello '; | |
array_push($_, $_POST); | |
array_push($_,'name'); | |
$T = array_pop($_); | |
$U = array_pop($_); | |
array_push($_, $U[$T]); | |
array_push($_, call_user_func_array('htmlspecialchars', array_reverse(array(array_pop($_))))); | |
echo array_pop($_); | |
echo '!</p> | |
<p><a href="'; | |
array_push($_, $_SERVER); | |
array_push($_,'PHP_SELF'); | |
$T = array_pop($_); | |
$U = array_pop($_); | |
array_push($_, $U[$T]); | |
echo array_pop($_); | |
echo '">try again?</a></p> | |
'; | |
} else { | |
echo ' <p>What\'s your name?</p> | |
<form method="POST"> | |
<input name="name"> | |
<input type="submit" value="go"> | |
</form> | |
'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment