Created
February 15, 2012 14:16
-
-
Save duanegran/1836042 to your computer and use it in GitHub Desktop.
Anti-Pattern for setting the $_POST variable in PHP
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
foreach($_SESSION["purchase"] as $key=>$value) | |
{ | |
switch($key) | |
{ | |
case "process_purchase": | |
break; | |
default: | |
$_POST[$key] = $value; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment