Skip to content

Instantly share code, notes, and snippets.

@duanegran
Created February 15, 2012 14:16
Show Gist options
  • Save duanegran/1836042 to your computer and use it in GitHub Desktop.
Save duanegran/1836042 to your computer and use it in GitHub Desktop.
Anti-Pattern for setting the $_POST variable in PHP
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