Re: urgent: Passing PHP variables in SMARTY

"Muhammed Mamedov" <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <02ab01c3f161$c73559f0$8d02000a@mm>
Thanks for your help.
Yea I found that using global variables we can get that variable out..

* just to note I am more than 2 years a PHP developer.

Regards,
- Muhammed

----- Original Message ----- 
From: "Monte Ohrt" <[email protected]>
To: "Muhammed Mamedov" <[email protected]>
Cc: "Smarty Dev" <[email protected]>
Sent: Wednesday, February 11, 2004 7:52 PM
Subject: Re: [SMARTY-DEV] urgent: Passing PHP variables in SMARTY


> On Wed, 2004-02-11 at 09:54, Muhammed Mamedov wrote:
> > Hi everybody!
> > 
> > I have a big problem here...
> > I have a web site in PHP and want to convert it into SMARTY style.
> > 
> > I have calls like this in my main file (old one, with no SMARTY):
> > main.php?lang=en&cn=1
> > 
> > How can I catch this variables in my template?
> > 
> > I tried this and it didn't work:
> > index.php (SMARTY based)
> > $smarty->assign("portal",$lang);
> 
> $_GET['lang'] would contain your value from the URL for sure. $lang
> might or might not have it depending on your globals setting and your
> context.
> 
> You need some basic training in PHP before you tackle Smarty.
> 
> 
> 

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.