Page 1 of 1

send smarty variable via URL ? [SOLVED]

Posted: Mon Jun 28, 2010 7:52 pm
by antosha
Hi,
I am sure I already read about somewhere in these forums but just can't find it anymore.
I was wondering how do I pass Smarty variables via URL?

For example:

http://mysite.com/somepage.html?somevariable=somevalue


Thanks!

Re: send smarty variable via URL ?

Posted: Tue Jun 29, 2010 1:59 am
by kermit
antosha wrote: how do I pass Smarty variables via URL?

For example:

http://mysite.com/somepage.html?somevariable=somevalue
if you put the following....

{$smarty.request.somevariable}


in a page requested via this url...

http://mysite.com/somepage.html?somevariable=somevalue


it would display...

somevalue




see http://www.smarty.net/manual/en/languag ... smarty.php

Re: send smarty variable via URL ?

Posted: Tue Jun 29, 2010 5:42 pm
by antosha
That was very helpful, thanks :)