Wednesday, March 31, 2010

Convert All POST Variables into SESSION Variables



function POSTtoSESSION($POST)
{
foreach($_POST as $POST_KEY => $POST_VAL)
{
$_SESSION[$POST_KEY] = $POST_VAL;
}
}

?>

With little or no modification you can use this function to convert your BIG POST array into a SESSION arrya without any worry.

No comments: