Re: [SMARTY] globals
| From: | messju mohr | Date: | Tue, 29 Jul 2003 22:04:36 +0000 |
| Subject: | Re: [SMARTY] globals | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9990@lists.php.net to get a copy of this message | ||
On Tue, Jul 29, 2003 at 11:59:00PM +0200, Olivier Doucet [reagi.com] wrote:
> Thx a lot, i understand now where is the problem.
>
> I'll use latest cvs :)
that's good, we always need people who run and test it.
use $smarty->request_use_auto_globals=true there.
greetings
messju
> ----- Original Message -----
> From: "Wom.bat" <wom.bat@gmx.net>
> To: "Olivier Doucet [reagi.com]" <webmaster@ajeux.com>
> Cc: <smarty-general@lists.php.net>
> Sent: Tuesday, July 29, 2003 11:56 PM
> Subject: Re: [SMARTY] globals
>
>
> > smarty 2.5.0 uses $GLOBALS["HTTP_POST_VARS"] and the other old arrays
> > instead of the new superglobals ($_GET, $_POST etc)... either use the
> latest
> > cvs version where you can choose between the two or use the other
> variables
> > to save you time, you can just do
> >
> > $GLOBALS["HTTP_GET_VARS"] =& $_GET;
> > $GLOBALS["HTTP_POST_VARS"] =& $_POST;
> >
> > at the beginning of your scripts
> >
> > that will create references to the superglobals and thus affect changes on
> > both variables
> >
> > David
> >
> >
> > On Tuesday, July 29, 2003 11:50 PM +0200, Olivier Doucet [reagi.com]
> wrote:
> > > Hi , I have some troubles with globals & smarty.
> > > Here is an example, it will be easier to understand :
> > >
> > > In php :
> > > [ smarty initialisation ]
> > > $myvar = "prenom";
> > > $_POST['nv_'.$myvar] = 'myvalue';
> > >
> > > [ smarty display]
> > >
> > > ---------
> > > in Tpl :
> > > --> {$smarty.post.nv_prenom} <--<br>
> > >
> > > --------
> > > but it echoed nothing :(((
> > >
> > > I've done a var_dump directly in php, and my var IS in _POST :
> > > array(1) { ["nv_prenom"] => string("7") "myvalue" }
> > >
> > >
> > > Any idea ???
> > >
> > > Olivier Doucet