How do I move a value out of Smarty and back to my code?
I have a webpage that dumps results from a database into User Friendly Format Smarty templates. On one template page, I need the user to add additional information and then save this to the database. However, I'm having no luck returning this info from .tpl to .php. Passing variables from .php to .tpl is a simple $smarty->assign("variable",$variable); but is there a way to pass variables back???
example:
---main.php---------------
<?php
CORE CODE: Result variables
$smarty->assign("variables",$variables);
$smarty->display('result.tpl');
?>
---result.tpl----------------
{php}
"dumping variables in user friendly format"
$newVariable = array("additional","questions");
{/php}
I need the $newVariable to be passed back to main.php so it can be saved (serialized) into the database. I tried to pass it in a session with no luck.
Each result.tpl page has multiple ways out (NEXT, 1|2|3|4|5|6, RETURN, etc) and I'd like the data to be saved whatever button is pressed.