Created
February 1, 2013 15:18
-
-
Save donnywals/4691911 to your computer and use it in GitHub Desktop.
This file contains 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 | |
echo "<h1>stuff in GET</h1>"; | |
var_dump($_GET); | |
echo "<br /><br />"; | |
echo "<h1>stuff in POST</h1>"; | |
var_dump($_POST); | |
echo "<br /><br />"; | |
if(isset($_GET['val'])) { | |
$val = $_GET['val']; | |
} else { | |
$val = false; | |
} | |
?> | |
<html> | |
<head> | |
<title>Hoi Marijke</title> | |
</head> | |
<body> | |
<h2>Deze knop verstuurt een formulier zonder hidden field</h2> | |
<form action="index.php" method="post"> | |
<input type="submit" /> | |
</form> | |
<h2>Deze knop verstuurt een formulier met hidden field</h2> | |
<form action="index.php" method="post"> | |
<input type="hidden" value="<?= $val ?>" name = "val" /> | |
<input type="submit" /> | |
</form> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment