Skip to content

Instantly share code, notes, and snippets.

View duanegran's full-sized avatar

Duane Gran duanegran

  • Charlottesville, VA
View GitHub Profile
@duanegran
duanegran / php-dont-do-this
Created February 15, 2012 14:16
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;
}