Variable doesn't update

From: Date: Wed, 27 Aug 2003 05:16:34 +0000
Subject: Variable doesn't update
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10130@lists.php.net to get a copy of this message
Hi there, I am having trouble with a variable assigned to a template. I use the following link: Main.php?action=show=id=administration&tab=foo In my php script, I have the following: else if ($id == "administration") { if($smarty->is_cached('administration.tpl',$id)) { $smarty->delete_cache('administration.tpl', $id); } // Set the tab name to look at, and assign to the template $tabname = $_GET['tab']; echo "Tabname = $tabname<br>"; $smarty->clear_assign("tabname"); $smarty->assign("tabname", $tabname); $smarty->display("administration.tpl"); } And finally, in my template, I have the following: <tr> <td colspan=8 class="window_header"> BVD Press Online :: Administration for {$tabname} </td> </tr> So far so good. But when I go to Main.php?action=show=id=administration&tab=bar, {$tabname} still prints "foo". As you can see, I tried a bunch of things to clear the contents of that variable in the php script, but I cannot get the Smarty template to update. I also tried to assign_by_ref, and had the same results. Any ideas? Erich Beyrent

« previous php.smarty.general (#10130) next »