the foreach method is not working properly in the smarty template engine. Can you show how it might look using a while loop
// Foreach data in post array saved : add a new input in the redirection form
foreach($_SESSION['POSTDATA'] as $key => $value)
{
if($key!='ACTION' && $key!='AES_KEYS')
{
$smarty->assign('postdata',array('id' => $key, 'name' => $key, 'value' => $value));
}
}
$_SESSION['POSTDATA'] = '';
As per your code, you could try this to be correct (since you're trashing the previous 'postdata' value at each loop iteration and want to exclude ACTION and AES_KEYS keys):
Then you can access your 'postdata' variable assigned to smarty using this:
Anyway you could directly access the session global using this in smarty 3:
or this