SV: [SMARTY] Using $HTTP_POST_VARS for $smarty.post...

From: Date: Wed, 12 Mar 2003 16:44:22 +0000
Subject: SV: [SMARTY] Using $HTTP_POST_VARS for $smarty.post...
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8582@lists.php.net to get a copy of this message
> -----Oprindelig meddelelse----- > Fra: messju mohr [mailto:messju@lammfellpuschen.de] > > On Wed, Mar 12, 2003 at 04:46:49PM +0100, Joscha Feth wrote: > > Paul Lockaby wrote: > > > Joscha Feth wrote: > > >> Paul Lockaby wrote: > > >> > > >>> Try this: $HTTP_POST_VARS =& $_POST > > >> > > >> > > >> I know - just try it and you will see it does not work! > > >> > > > > > > Actually, I did just try that and it did work. Are you sure that > > > you're including the ampersand (&) after the equal sign (=)? > > > > I am not saying the code you posted does not work, it is just I use this > > function on my $_* arrays > > http://dev.feth.com/PHP/my_magic_quotes.phps > > and if I use =& Smarty seems to ignore that, because in the compiled > > template no reference is used. I guess the problem is that your function uses a foreach loop. Foreach works on a copy of the array. Paolo > > i tested, and don't have any problems: > > $HTTP_POST_VARS =& $_POST; > $_POST = my_magic_quotes($_POST,false); > $_POST['foo'] = 'bla'; > > and in the template {$smarty.get.foo} has the correct 'bla'. > > > > greets, > > Joscha > > > > > > > > -- > > Smarty General Mailing List (http://smarty.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > c't: Eine weniger gelesene Zeitschrift. > OLG Düsseldorf: > AZ 20 U 78/98 > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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